make sure we don't miss our scheduled tasks

This commit is contained in:
Joseph Bryant 2024-08-18 20:09:06 +01:00
parent 0ad5fa4733
commit 20b4a32835

View file

@ -201,7 +201,7 @@ static void _movement_handle_scheduled_tasks(void) {
for(uint8_t i = 0; i < MOVEMENT_NUM_FACES; i++) { for(uint8_t i = 0; i < MOVEMENT_NUM_FACES; i++) {
if (scheduled_tasks[i].reg) { if (scheduled_tasks[i].reg) {
if (scheduled_tasks[i].reg == date_time.reg) { if (scheduled_tasks[i].reg <= date_time.reg) {
scheduled_tasks[i].reg = 0; scheduled_tasks[i].reg = 0;
movement_event_t background_event = { EVENT_BACKGROUND_TASK, 0 }; movement_event_t background_event = { EVENT_BACKGROUND_TASK, 0 };
watch_faces[i].loop(background_event, &movement_state.settings, watch_face_contexts[i]); watch_faces[i].loop(background_event, &movement_state.settings, watch_face_contexts[i]);