Fix faces that relied on watch_buzzer_play_note being blocking

This commit is contained in:
Alessandro Genova
2025-08-17 23:35:15 -04:00
parent 04276c1999
commit cb05585c15
4 changed files with 53 additions and 41 deletions
+17 -7
View File
@@ -82,26 +82,36 @@ static inline int _days_in_month(int16_t month, int16_t year)
/* Play beep sound based on type */
static inline void _beep(beep_type_t beep_type)
{
static int8_t beep_sequence[] = {
0, 4,
0, 6,
0, 6,
0
};
if (!movement_button_should_sound())
return;
switch (beep_type) {
case BEEP_BUTTON:
watch_buzzer_play_note_with_volume(BUZZER_NOTE_C7, 50, movement_button_volume());
beep_sequence[0] = BUZZER_NOTE_C7;
beep_sequence[2] = 0;
break;
case BEEP_ENABLE:
watch_buzzer_play_note_with_volume(BUZZER_NOTE_G7, 50, movement_button_volume());
watch_buzzer_play_note(BUZZER_NOTE_REST, 75);
watch_buzzer_play_note_with_volume(BUZZER_NOTE_C8, 50, movement_button_volume());
beep_sequence[0] = BUZZER_NOTE_G7;
beep_sequence[2] = BUZZER_NOTE_REST;
beep_sequence[4] = BUZZER_NOTE_C8;
break;
case BEEP_DISABLE:
watch_buzzer_play_note_with_volume(BUZZER_NOTE_C8, 50, movement_button_volume());
watch_buzzer_play_note(BUZZER_NOTE_REST, 75);
watch_buzzer_play_note_with_volume(BUZZER_NOTE_G7, 50, movement_button_volume());
beep_sequence[0] = BUZZER_NOTE_C8;
beep_sequence[2] = BUZZER_NOTE_REST;
beep_sequence[4] = BUZZER_NOTE_G7;
break;
}
movement_play_sequence(beep_sequence, 0);
}
/* Change tick frequency */