fix scheduled tasks scheduling another task
This commit is contained in:
parent
dfb928b9d6
commit
86f34b3653
@ -159,6 +159,10 @@ static void _movement_handle_scheduled_tasks(void) {
|
|||||||
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]);
|
||||||
|
// check if loop scheduled a new task
|
||||||
|
if (scheduled_tasks[i].reg) {
|
||||||
|
num_active_tasks++;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
num_active_tasks++;
|
num_active_tasks++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user