Fix buttons
This commit is contained in:
parent
d0545ec844
commit
e2ce72200e
|
@ -19,6 +19,7 @@ void buttons_setup() {
|
||||||
SETUP(OPEN);
|
SETUP(OPEN);
|
||||||
SETUP(CLOSE);
|
SETUP(CLOSE);
|
||||||
#undef SETUP
|
#undef SETUP
|
||||||
|
buttons_release();
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t open_ticks = 0;
|
static uint32_t open_ticks = 0;
|
||||||
|
@ -55,7 +56,7 @@ void buttons_tick(void) {
|
||||||
close_ticks--;
|
close_ticks--;
|
||||||
if (!close_ticks) {
|
if (!close_ticks) {
|
||||||
printf("Release close");
|
printf("Release close");
|
||||||
gpio_set(OPEN_PORT, CLOSE_BUTTON);
|
gpio_set(CLOSE_PORT, CLOSE_BUTTON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user