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); show_float(ticks / 1000.0f);
if (!pressed_pause && bit_is_clear(PINK, PINK7)) { if (!pressed_pause && bit_is_clear(PINK, PINK7)) {
beep();
counting = !counting; counting = !counting;
pressed_pause = true; pressed_pause = true;
beep();
} else if (pressed_pause && bit_is_set(PINK, PINK7)) { } else if (pressed_pause && bit_is_set(PINK, PINK7)) {
pressed_pause = false; pressed_pause = false;
} }
if (bit_is_clear(PINK, PINK6)) { if (bit_is_clear(PINK, PINK6)) {
if (!pressed_clear) beep(50);
ticks = 0; ticks = 0;
counting = false; counting = false;
if (!pressed_clear) beep(50);
pressed_clear = true; pressed_clear = true;
} else pressed_clear = false; } else pressed_clear = false;
} }