summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiclas Hoyer <info@niclashoyer.de>2022-10-21 01:10:12 +0200
committerNiclas Hoyer <info@niclashoyer.de>2022-10-21 01:10:12 +0200
commit86f34b365375b42279febb20fd744da00f9f1118 (patch)
treea63c0b033239c3a04e59b5e43f35ef6d05c021a1
parentdfb928b9d6d1cf62d09c48f54b57d3e6fc970245 (diff)
downloadSensor-Watch-86f34b365375b42279febb20fd744da00f9f1118.tar.gz
Sensor-Watch-86f34b365375b42279febb20fd744da00f9f1118.tar.bz2
Sensor-Watch-86f34b365375b42279febb20fd744da00f9f1118.zip
fix scheduled tasks scheduling another task
-rw-r--r--movement/movement.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/movement/movement.c b/movement/movement.c
index 8c58b202..e904687c 100644
--- a/movement/movement.c
+++ b/movement/movement.c
@@ -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++;
}