BTNPIN compile time option sets unused buttons to GPIO 0
robertvb83 opened this issue · comments
What happened?
Setting 4 buttons works as expected (buttons GPIO are only set but still disabled) -D BTNPIN=0,4,34,35
However if you set less than 4 buttons, the remaining buttons are set to GPIO 0 automatically. Leading to double entries for 0
-D BTNPIN=0,4
To Reproduce Bug
See above
Expected Behavior
Set other buttons to "unused"
Install Method
Self-Compiled
What version of WLED?
WLED 0.15-b3
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
No response
Anything else?
Code of Conduct
- I agree to follow this project's Code of Conduct
Just define BTNPIN=0,4,-1,-1
You can also set BTNTYPE if you wish.
thank you, that is, what i was looking for.
how is BTNTYPE set? i use 2 push buttons and 1 analog potentiometer, 4th button should be GPIO35 but disabled by default
BTNPIN=0,4,34,35
BTNTYPE = PUSH, PUSH, ANALOG, -1
Check const.h
for button types.
Check
const.h
for button types.
Thanks for pointing me in that direction. It works exactly as it should