Pārlūkot izejas kodu

countdown timer: use a custom alert sequence for time-up alarm

For timer expiry, replaces use of the builtin `sequence_audiovisual_alert`
notification sequence wiith a custom alarm modeled after that of a typical
electronic kitchen timer. (A repeating one second sequence of four short beeps)

Note this currently omits the sound and vibration setting overrides that
feature in the builtin sequence, so the alarm will now follow the user's
sound and vibration settings.
woob 1 gadu atpakaļ
vecāks
revīzija
2d24e1ac9d
1 mainītis faili ar 36 papildinājumiem un 0 dzēšanām
  1. 36 0
      utils/utils.c

+ 36 - 0
utils/utils.c

@@ -10,6 +10,42 @@ static const NotificationSequence sequence_beep = {
     NULL,
 };
 
+static const NotificationSequence sequence_timeup = {
+    &message_force_display_brightness_setting_1f,
+    &message_display_backlight_on,
+    &message_vibro_on,
+
+    &message_note_c8,
+    &message_delay_50,
+    &message_sound_off,
+    &message_delay_50,
+    &message_delay_25,
+
+    &message_note_c8,
+    &message_delay_50,
+    &message_sound_off,
+    &message_delay_50,
+    &message_delay_25,
+
+    &message_note_c8,
+    &message_delay_50,
+    &message_sound_off,
+    &message_delay_50,
+    &message_delay_25,
+
+    &message_note_c8,
+    &message_delay_50,
+    &message_sound_off,
+    &message_delay_50,
+    &message_delay_25,
+
+    &message_vibro_off,
+    &message_display_backlight_off,
+    &message_delay_500,
+
+    NULL,
+};
+
 void notification_beep_once() {
     notification_message(furi_record_open(RECORD_NOTIFICATION), &sequence_beep);
     notification_off();