summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoeycastillo <joeycastillo@utexas.edu>2022-11-27 16:52:25 -0600
committerjoeycastillo <joeycastillo@utexas.edu>2022-11-27 16:52:25 -0600
commit9c2c9087bfcbea1938031b8f2e64f863f7a0ed61 (patch)
treecadbe105da6b087be1534660bd58abc9582edac0
parent5de8a11968293e1d5a76f7f4f300e6d51446eb7f (diff)
downloadSensor-Watch-9c2c9087bfcbea1938031b8f2e64f863f7a0ed61.tar.gz
Sensor-Watch-9c2c9087bfcbea1938031b8f2e64f863f7a0ed61.tar.bz2
Sensor-Watch-9c2c9087bfcbea1938031b8f2e64f863f7a0ed61.zip
make stopwatch beep when started/stopped
-rw-r--r--movement/watch_faces/complication/stopwatch_face.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/movement/watch_faces/complication/stopwatch_face.c b/movement/watch_faces/complication/stopwatch_face.c
index e85bbd65..5a465183 100644
--- a/movement/watch_faces/complication/stopwatch_face.c
+++ b/movement/watch_faces/complication/stopwatch_face.c
@@ -77,7 +77,6 @@ void stopwatch_face_activate(movement_settings_t *settings, void *context) {
}
bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
- (void) settings;
stopwatch_state_t *stopwatch_state = (stopwatch_state_t *)context;
switch (event.event_type) {
@@ -103,6 +102,9 @@ bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings,
}
break;
case EVENT_ALARM_BUTTON_DOWN:
+ if (settings->bit.button_should_sound) {
+ watch_buzzer_play_note(BUZZER_NOTE_C8, 50);
+ }
stopwatch_state->running = !stopwatch_state->running;
if (stopwatch_state->running) {
// we're running now, so we need to set the start_time.