beep after changing state
This commit is contained in:
parent
1884d06102
commit
86f1744f25
5
main.c
5
main.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue