Simplify ESP32-S3 module and pinout selection, allow GRB and RGB LEDs#17
Simplify ESP32-S3 module and pinout selection, allow GRB and RGB LEDs#17Cyberslug wants to merge 2 commits intoplainFlight:mainfrom
Conversation
Removed auxiliary IO pin allocations for better clarity.
|
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 🙂 |
|
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 ... |
|
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. |
|
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. |
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.