]> git.earman.xyz Git - sensor-watch.git/commitdiff
don't jump missed ticks, forgot callbacks
authorredraw <redraw@sdf.org>
Fri, 23 Jan 2026 02:55:55 +0000 (23:55 -0300)
committerredraw <redraw@sdf.org>
Fri, 23 Jan 2026 02:55:55 +0000 (23:55 -0300)
watch-library/simulator/watch/watch_rtc.c

index 3492032f5a9d0831dfcfec801b3b5aa142528aae..93da5e6b2bf2a78f662a52a21e30c73842ada0ec 100644 (file)
@@ -166,8 +166,6 @@ void watch_rtc_disable_tick_callback(void) {
     watch_rtc_disable_periodic_callback(1);
 }
 
-static void _watch_increase_counter(void *userData);
-
 static void _watch_schedule_next_tick(void) {
     if (!rtc_enabled) return;
 
@@ -180,10 +178,8 @@ static void _watch_schedule_next_tick(void) {
     next_tick_time += ms;
     double delay = next_tick_time - now;
 
-    // If we're behind, jump counter forward and reset timing
+    // If we're behind, reset timing
     if (delay < 0) {
-        uint32_t missed_ticks = (uint32_t)((-delay) / ms);
-        counter += missed_ticks;
         next_tick_time = now + ms;
         delay = ms;
     }