summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/clock/weeknumber_clock_face.c
diff options
context:
space:
mode:
Diffstat (limited to 'movement/watch_faces/clock/weeknumber_clock_face.c')
-rw-r--r--movement/watch_faces/clock/weeknumber_clock_face.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/movement/watch_faces/clock/weeknumber_clock_face.c b/movement/watch_faces/clock/weeknumber_clock_face.c
index 45d751af..e49e5abf 100644
--- a/movement/watch_faces/clock/weeknumber_clock_face.c
+++ b/movement/watch_faces/clock/weeknumber_clock_face.c
@@ -136,7 +136,17 @@ bool weeknumber_clock_face_loop(movement_event_t event, movement_settings_t *set
case EVENT_BACKGROUND_TASK:
// uncomment this line to snap back to the clock face when the hour signal sounds:
// movement_move_to_face(state->watch_face_index);
- movement_play_signal();
+ if (watch_is_buzzer_or_led_enabled()) {
+ // if we are in the foreground, we can just beep.
+ movement_play_signal();
+ } else {
+ // if we were in the background, we need to enable the buzzer peripheral first,
+ watch_enable_buzzer();
+ // beep quickly (this call blocks for 275 ms),
+ movement_play_signal();
+ // and then turn the buzzer peripheral off again.
+ watch_disable_buzzer();
+ }
break;
default:
break;