From 84b243b77268bafa2433d1815d93a230c14f49b7 Mon Sep 17 00:00:00 2001 From: Richard Meadows Date: Sat, 18 Jul 2015 13:29:27 +0100 Subject: [PATCH] [Ooops] Fixed underflow --- firmware/src/cron.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/src/cron.c b/firmware/src/cron.c index 7346bd2..c4ef1cf 100644 --- a/firmware/src/cron.c +++ b/firmware/src/cron.c @@ -152,9 +152,9 @@ void cron_telemetry(struct tracker_time* t) void do_cron(void) { /* ---- Local representation of the time ---- */ - while (ticks--) { + while (ticks) { /* Update time internally */ - time.epoch++; time.second++; + ticks--; time.epoch++; time.second++; if (time.second >= 60) { time.second = 0; time.minute++; if (time.minute >= 60) {