beep after changing state

This commit is contained in:
Lea 2023-08-29 20:40:50 +02:00
parent 1884d06102
commit 86f1744f25
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

5
main.c
View file

@ -100,17 +100,18 @@ void prog_7segment_4digit() {
show_float(ticks / 1000.0f);
if (!pressed_pause && bit_is_clear(PINK, PINK7)) {
beep();
counting = !counting;
pressed_pause = true;
beep();
} else if (pressed_pause && bit_is_set(PINK, PINK7)) {
pressed_pause = false;
}
if (bit_is_clear(PINK, PINK6)) {
if (!pressed_clear) beep(50);
ticks = 0;
counting = false;
if (!pressed_clear) beep(50);
pressed_clear = true;
} else pressed_clear = false;
}