Update clock_app.c

This commit is contained in:
r3df0xx
2022-05-18 01:33:40 +03:00
parent 1d9099ddb5
commit 1ffe4bd582

View File

@@ -64,6 +64,8 @@ static void clock_render_callback(Canvas* const canvas, void* ctx) {
elements_button_right(canvas, "S:PoRa"); elements_button_right(canvas, "S:PoRa");
} else if(songSelect==2) { } else if(songSelect==2) {
elements_button_right(canvas, "S:Mario"); elements_button_right(canvas, "S:Mario");
} else if(songSelect==3) {
elements_button_right(canvas, "S:ByMin");
} }
} }
@@ -140,7 +142,7 @@ static void clock_tick(void* ctx) {
PluginEvent event = {.type = EventTypeTick}; PluginEvent event = {.type = EventTypeTick};
if(timerStarted) { if(timerStarted) {
timerSecs=timerSecs+1; timerSecs=timerSecs+1;
if(timerSecs%60==0) { if(timerSecs%60==0 && songSelect!=0) {
NotificationApp* notification = furi_record_open("notification"); NotificationApp* notification = furi_record_open("notification");
notification_message(notification, &clock_alert_perMin); notification_message(notification, &clock_alert_perMin);
furi_record_close("notification"); furi_record_close("notification");
@@ -233,6 +235,8 @@ int32_t clock_app(void* p) {
songSelect=1; songSelect=1;
} else if(songSelect==1) { } else if(songSelect==1) {
songSelect=2; songSelect=2;
} else if(songSelect==2) {
songSelect=3;
} else { } else {
songSelect=0; songSelect=0;
} }
@@ -240,7 +244,7 @@ int32_t clock_app(void* p) {
case InputKeyLeft: case InputKeyLeft:
break; break;
case InputKeyOk: case InputKeyOk:
if(songSelect==1 || songSelect==2) { if(songSelect==1 || songSelect==2 || songSelect==3) {
NotificationApp* notification = furi_record_open("notification"); NotificationApp* notification = furi_record_open("notification");
notification_message(notification, &clock_alert_startStop); notification_message(notification, &clock_alert_startStop);
furi_record_close("notification"); furi_record_close("notification");