mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Rename plugins to external
This commit is contained in:
34
applications/external/cntdown_timer/utils/utils.c
vendored
Normal file
34
applications/external/cntdown_timer/utils/utils.c
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
#include <furi.h>
|
||||
#include "utils.h"
|
||||
|
||||
static const NotificationSequence sequence_beep = {
|
||||
&message_blue_255,
|
||||
&message_note_d5,
|
||||
&message_delay_100,
|
||||
&message_sound_off,
|
||||
|
||||
NULL,
|
||||
};
|
||||
|
||||
void notification_beep_once() {
|
||||
notification_message(furi_record_open(RECORD_NOTIFICATION), &sequence_beep);
|
||||
notification_off();
|
||||
}
|
||||
|
||||
void notification_off() {
|
||||
furi_record_close(RECORD_NOTIFICATION);
|
||||
}
|
||||
|
||||
void notification_timeup() {
|
||||
notification_message(furi_record_open(RECORD_NOTIFICATION), &sequence_audiovisual_alert);
|
||||
}
|
||||
|
||||
void parse_sec_to_time_str(char* buffer, size_t len, int32_t sec) {
|
||||
snprintf(
|
||||
buffer,
|
||||
len,
|
||||
"%02ld:%02ld:%02ld",
|
||||
(sec % (60 * 60 * 24)) / (60 * 60), // hour
|
||||
(sec % (60 * 60)) / 60, // minute
|
||||
sec % 60); // second
|
||||
}
|
||||
Reference in New Issue
Block a user