move buzzer enabled detection logic into movement for movement_play_signal/tune
this way watch faces don't have to disable/enable the buzzer themselves before calling movement_play_signal() and movement_play_tune()
This commit is contained in:
@@ -151,11 +151,7 @@ bool repetition_minute_face_loop(movement_event_t event, movement_settings_t *se
|
||||
else watch_clear_indicator(WATCH_INDICATOR_BELL);
|
||||
break;
|
||||
case EVENT_BACKGROUND_TASK:
|
||||
if (watch_is_buzzer_or_led_enabled()) {
|
||||
movement_play_signal();
|
||||
} else {
|
||||
movement_play_signal_background();
|
||||
}
|
||||
movement_play_signal();
|
||||
break;
|
||||
case EVENT_LIGHT_LONG_UP:
|
||||
/*
|
||||
|
||||
@@ -180,11 +180,7 @@ bool simple_clock_bin_led_face_loop(movement_event_t event, movement_settings_t
|
||||
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()) {
|
||||
movement_play_signal();
|
||||
} else {
|
||||
movement_play_signal_background();
|
||||
}
|
||||
movement_play_signal();
|
||||
break;
|
||||
case EVENT_LIGHT_LONG_PRESS:
|
||||
if (state->flashing_state == 0) {
|
||||
|
||||
@@ -136,11 +136,7 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting
|
||||
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()) {
|
||||
movement_play_tune();
|
||||
} else {
|
||||
movement_play_tune_background();
|
||||
}
|
||||
movement_play_tune();
|
||||
break;
|
||||
default:
|
||||
return movement_default_loop_handler(event, settings);
|
||||
|
||||
@@ -130,11 +130,7 @@ 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);
|
||||
if (watch_is_buzzer_or_led_enabled()) {
|
||||
movement_play_signal();
|
||||
} else {
|
||||
movement_play_signal_background();
|
||||
}
|
||||
movement_play_signal();
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
|
||||
Reference in New Issue
Block a user