mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-01 15:07:42 +00:00
Fix inverted buttons
Fix inverted buttons
This commit is contained in:
parent
2fc2535c7b
commit
6c8e15dadd
@ -121,7 +121,7 @@ void ButtonHandler(void)
|
|||||||
} else {
|
} else {
|
||||||
if (pin[GPIO_KEY1 +button_index] < 99) {
|
if (pin[GPIO_KEY1 +button_index] < 99) {
|
||||||
button_present = 1;
|
button_present = 1;
|
||||||
button = (digitalRead(pin[GPIO_KEY1 +button_index]) != key_inverted);
|
button = (digitalRead(pin[GPIO_KEY1 +button_index]) != bitRead(key_inverted, button_index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user