Enable custom signal tones in LE mode.
This makes movement_play_signal synchronous when in LE mode, despite using the underlying asynchronous API. It's a bit of a hack, but it should work well enough for now. This also moves the enabling/disabling of the buzzer into the movement_play_signal function, so that watch faces no longer have to do it.
This commit is contained in:
@@ -153,17 +153,7 @@ bool repetition_minute_face_loop(movement_event_t event, movement_settings_t *se
|
||||
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);
|
||||
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();
|
||||
}
|
||||
movement_play_signal();
|
||||
break;
|
||||
case EVENT_LIGHT_LONG_UP:
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user