Fix inverted buttons

Fix inverted buttons
This commit is contained in:
Theo Arends 2019-01-28 10:18:44 +01:00
parent 2fc2535c7b
commit 6c8e15dadd
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ void ButtonHandler(void)
} else {
if (pin[GPIO_KEY1 +button_index] < 99) {
button_present = 1;
button = (digitalRead(pin[GPIO_KEY1 +button_index]) != key_inverted);
button = (digitalRead(pin[GPIO_KEY1 +button_index]) != bitRead(key_inverted, button_index));
}
}