Skip to content

Commit

Permalink
countdown timer: use a custom alert sequence for time-up alarm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
puppable authored and 0w0mewo committed May 23, 2024
1 parent 23e4aff commit 2d24e1a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions utils/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2d24e1a

Please sign in to comment.