Skip to content

Simplify ESP32-S3 module and pinout selection, allow GRB and RGB LEDs#17

Open
Cyberslug wants to merge 2 commits intoplainFlight:mainfrom
Cyberslug:BoardConfig_and_LED
Open

Simplify ESP32-S3 module and pinout selection, allow GRB and RGB LEDs#17
Cyberslug wants to merge 2 commits intoplainFlight:mainfrom
Cyberslug:BoardConfig_and_LED

Conversation

@Cyberslug
Copy link
Copy Markdown
Contributor

This PR addresses Issue #16

Configuration items relating to pin selection have been moved from config.hpp to BoardConfig.hpp. Two example configurations have been included for the XIAO ESP32-S3 and the Waveshare Zero boards. Additional boards or different pin usage with these boards can be accommodated by editing or creating new board definitions. Boards are defined in the BoardConfig namespace. The desired board config is selected at the start of the Config.hpp file.

In addition to enabling different board configurations this PR also addresses the use of GRB Neopixel devices used on some boards. A new configuration option has been added to Config.hpp "SWAP_NEOPIXEL_RED_GREEN" which when set to true swaps red and green. Use this if your LED colours are not correct.

@plainFlight
Copy link
Copy Markdown
Owner

Only just got around to looking at this on my phone GitHub app... Looks good but I want to have a good look on my laptop and digest it properly over the weekend. Bare with me 🙂

@Cyberslug
Copy link
Copy Markdown
Contributor Author

No worries. It is a basis for change. Ideally I think that these should be separate files but in the spirit of keeping it simple ...
In any case I will be out of action until mid April. I look forward to your comments when I return.

@plainFlight
Copy link
Copy Markdown
Owner

plainFlight commented Mar 14, 2026

So, studied and tested this pull request. All good... but, I didn't like the use of #define to select the board config 😅 as I felt it was out of place with the code base and Config.hpp. As a result I took the basis of your work and doctored it to use structures for different boards. See pull request 19... I thought I owed you the curtesy to have a look and chance to comment before I merge it. I have test flown pull request 19 today using XIAO board.

Just out of interest does your UK trip include a visit to Stonehenge? ...our flying site is just within visual sight of the visitor centre.

@Cyberslug
Copy link
Copy Markdown
Contributor Author

Hi Paul, that is funny I was at Stonehenge last Thursday. Incredibly windy day. I am up in Wales at the moment but will return to that area around Easter.
Re the changes to the code. I am not precious about the code and it is your project. Unfortunately I really can't look at what you have done here but would just note that my PR was just a step towards separating items that are fundamental to the build like which pins do servos and which do LEDs, colour order for neopixel etc. versus cinfig of the board like refresh rates and model type. I would ideally put the former in a separate file and use #include or #define and the later with variable assigns as per your original config.
Cheers

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