Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.66k stars 3.15k forks source link

Pins reserved in PinManager not reflected in LED settings UI page #4070

Closed axlan closed 2 months ago

axlan commented 2 months ago

What happened?

When writing a UserMod that makes use of pins beside the global SPI/I2C, you can allocate them in the PinManager.

These pins show up as unused in the "Button N GPIO:" dropdown. Trying to save them will be rejected on the device, but their won't be any indication in the UI aside from the button value going back to disabled.

To Reproduce Bug

Write a usermod that allocates pins. Try settings those pins to push buttons in the web UI.

Expected Behavior

These pins should probably not be listed as options, or disabled and indicated that they're used by a UserMod (similar to how they currently indicate they're used by other buttons/LED).

Install Method

Self-Compiled

What version of WLED?

v0.14.4-6-g3615ab53

Which microcontroller/board are you seeing the problem on?

ESP32-S3

Relevant log/trace output

No response

Anything else?

The simplest fix appears to be including pins allocated by things other then the buttons/LED in the um_p field updated in wled00/xml.cpp, appendGPIOinfo(). It's currently just including the i2c_sda/i2c_scl/spi_mosi/spi_sclk .

Code of Conduct

axlan commented 2 months ago

I made a simple fix https://github.com/Aircoookie/WLED/pull/4071

blazoncek commented 2 months ago

This is considered a bug in usermod, not WLED. See my comment in #4071.