mirror of
https://github.com/whowechina/mai_pico.git
synced 2024-11-11 23:27:10 +01:00
Fix button read bug introduced in earlier commit
This commit is contained in:
parent
fe566b29db
commit
f3355cc1fa
@ -65,7 +65,7 @@ void button_update()
|
||||
uint16_t buttons = 0;
|
||||
|
||||
for (int i = BUTTON_NUM - 1; i >= 0; i--) {
|
||||
bool sw_pressed = !gpio_real[i];
|
||||
bool sw_pressed = !gpio_get(gpio_real[i]);
|
||||
|
||||
if (now >= sw_freeze_time[i]) {
|
||||
if (sw_pressed != sw_val[i]) {
|
||||
|
Loading…
Reference in New Issue
Block a user