fix scheduled tasks scheduling another task

This commit is contained in:
Niclas Hoyer 2022-10-21 01:10:12 +02:00
parent dfb928b9d6
commit 86f34b3653

View File

@ -159,6 +159,10 @@ static void _movement_handle_scheduled_tasks(void) {
scheduled_tasks[i].reg = 0;
movement_event_t background_event = { EVENT_BACKGROUND_TASK, 0 };
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 {
num_active_tasks++;
}