Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support added for avaspark-rgb board target. Fixed being able to defi… #66

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

Relys
Copy link
Contributor

@Relys Relys commented Aug 24, 2023

…ne CAN bus pins as opposed to hardcoded. Overloaded Ws28xxController setPixelColor functions to support seperate front/back GPIO pins for LEDs.

GPT4 output of commit diff:

`It appears that you're presenting code changes, most likely in a diff format, related to a project that involves embedded systems programming for a device such as an ESP32 microcontroller. The changes touch several aspects of the project, including CAN device communication, LED control, hardware pin configurations, and general system setup. Below, I'll provide an analysis of the changes made in each section.

platformio.ini: The updates in this file mainly concern the build configurations, including the definition of new pins and associated flags. It seems the changes allow customization and tuning for various environments and hardware configurations. For example, the [AVASPARK-RGB] section outlines various pins related to WS28xx LED stripes and Cheap Focer 2 configurations.
src/CanDevice.cpp and src/CanDevice.h: Changes here focus on how the CAN GPIO pins are handled. Previously, the pins were hardcoded in the init() method, but now they are mapped via macros, allowing them to be configured through the PlatformIO INI file.
src/LedControllerFactory.cpp: Changes to this file support the use of separate front and back pins for LED control, rather than using a single pin configuration. This adds flexibility in handling different LED setups.
src/Ws28xxController.cpp and src/Ws28xxController.h: These changes seem to be the core of the new feature for handling separate front and back pins for controlling WS28xx LED stripes. It includes defining constructors for single-pin and two-pin configurations, as well as handling different behavior for each configuration in methods like setPixelColor, show, and numPixels.
src/main.cpp: The changes here include the implementation of new features defined elsewhere. For example, the setup of the debug LED, the initiation of the LED controller with support for new pins, and the setup of pins related to direction and brake of what seems to be an electric motor. The setup and loop functions in this file appear to represent the main lifecycle of the embedded application.
These changes collectively seem to enhance the configurability, flexibility, and possibly the functionality of the system by adding support for new hardware components and allowing for easier modifications through build configuration. Some potential applications might include electric vehicle control, robotic systems, or any embedded system that requires sophisticated control of motors, LEDs, and other peripherals.`

…ne CAN bus pins as opposed to hardcoded. Overloaded Ws28xxController setPixelColor functions to support seperate front/back GPIO pins for LEDs.
@thankthemaker thankthemaker merged commit 95e3ac3 into thankthemaker:master Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants