}
void movement_play_signal(void) {
+ watch_buzzer_play_note(BUZZER_NOTE_C8, 75);
+ watch_buzzer_play_note(BUZZER_NOTE_REST, 100);
+ watch_buzzer_play_note(BUZZER_NOTE_C8, 100);
+}
+
+void movement_play_signal_background(void) {
+ watch_enable_buzzer();
+ movement_play_signal();
+ watch_disable_buzzer();
+}
+
+void movement_play_tune(void) {
watch_buzzer_play_sequence(signal_tune, NULL);
}
+/* Special version of movement_play_tune meant for use during LE mode */
+void movement_play_tune_background(void) {
+ watch_enable_buzzer();
+ watch_buzzer_play_sequence(signal_tune, watch_disable_buzzer);
+}
+
void movement_play_alarm(void) {
movement_play_alarm_beeps(5, BUZZER_NOTE_C8);
}
void movement_request_wake(void);
void movement_play_signal(void);
+void movement_play_signal_background(void);
+void movement_play_tune(void);
+void movement_play_tune_background(void);
void movement_play_alarm(void);
void movement_play_alarm_beeps(uint8_t rounds, BuzzerNote alarm_note);
else watch_clear_indicator(WATCH_INDICATOR_BELL);
break;
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_background();
}
break;
case EVENT_LIGHT_LONG_UP:
// 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_background();
}
break;
case EVENT_LIGHT_LONG_PRESS:
// 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();
+ movement_play_tune();
} 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_tune_background();
}
break;
default:
// 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_background();
}
break;
default: