|
|
@@ -61,6 +61,23 @@ static void auto_pause_activate(void) {
|
|
|
beep(50, 3);
|
|
|
}
|
|
|
|
|
|
+/* Call once, when tracking_pause() (working_modes.c) transitions
|
|
|
+ * tracking_paused from set to clear (a manual resume): auto_pause_process()
|
|
|
+ * only clears tracking_auto_paused while tracking_paused is *true* (to force
|
|
|
+ * an active auto-pause off the instant a manual pause starts), so without
|
|
|
+ * this, a manual resume while auto-paused would leave tracking_auto_paused
|
|
|
+ * set - tracking_is_paused() (tracking_paused || tracking_auto_paused) would
|
|
|
+ * still report paused, silently keeping the logger paused until the
|
|
|
+ * speed/distance-based auto-resume condition happened to also be met, well
|
|
|
+ * after the user asked to resume. No log/beep here (unlike auto_unpause()) -
|
|
|
+ * the manual resume already has its own distinct feedback. */
|
|
|
+void auto_pause_clear_manual_resume(void) {
|
|
|
+ System.tracking_auto_paused = 0;
|
|
|
+ auto_pause.prev_distance = System.distance;
|
|
|
+ auto_pause.point_counter = 0;
|
|
|
+ auto_pause.speed_counter = 0;
|
|
|
+}
|
|
|
+
|
|
|
/* Call once, whenever fix_gap_detected() reports a gap on the point about to
|
|
|
* be passed to auto_pause_process(). Without this, point_counter keeps
|
|
|
* counting straight through the gap with no idea how long it was or whether
|