From a3c6b40bed50199c1b73df94cf29fc9981556d3c Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 13 Aug 2026 22:59:45 -0400 Subject: [PATCH] Return to main alarm after 1 minute of awareness alarm --- src/c/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/c/main.c b/src/c/main.c index 55c7251..35b783d 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -172,7 +172,6 @@ static bool schedule_alarm(WakeupReason schedule_reason) { status = wakeup_schedule_simple_robust(target, 15, schedule_reason); if (s_alarming_for_awareness) { persist_write_bool(STORAGE_KEY_ALARMING_FOR_AWARENESS, false); - s_alarming_for_awareness = false; } break; case AWARENESS_ALARM: @@ -181,7 +180,6 @@ static bool schedule_alarm(WakeupReason schedule_reason) { status = wakeup_schedule_simple_robust(target, SECONDS_PER_MINUTE, schedule_reason); if (!s_alarming_for_awareness) { persist_write_bool(STORAGE_KEY_ALARMING_FOR_AWARENESS, true); - s_alarming_for_awareness = true; } break; case MAIN_ALARM: { @@ -198,7 +196,6 @@ static bool schedule_alarm(WakeupReason schedule_reason) { status = wakeup_schedule_simple_robust(target, SECONDS_PER_MINUTE, schedule_reason); if (s_alarming_for_awareness) { persist_write_bool(STORAGE_KEY_ALARMING_FOR_AWARENESS, false); - s_alarming_for_awareness = false; } } } @@ -239,6 +236,11 @@ static void alarm_seconds_handler(struct tm *tick_time, TimeUnits units_changed) if (s_stopwatch_time[1] == 59) { s_stopwatch_time[1] = 0; s_stopwatch_time[0]++; + // fall back to main alarm and resume vibes + // if the user fails to solve within a minute + if (s_alarming_for_awareness) { + s_alarming_for_awareness = false; + } } else { s_stopwatch_time[1]++; } @@ -655,7 +657,7 @@ static void alarm_select_hold_handler(void *recognizer, void *ctx) { push_status_window(0); } } else { - // otherwise, set awareness alarm + // otherwise, set awareness alarm and exit if (schedule_alarm(AWARENESS_ALARM)) { window_stack_pop_all(true); }