[rtc] simplify since_aprs

main-solar-only
Richard Meadows 2016-08-13 11:46:15 +01:00
rodzic f59c70ef4f
commit 35f2ecacfc
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -97,9 +97,6 @@ void rtc_hibernate_time(uint32_t time_s)
{ {
/* set hibernate time */ /* set hibernate time */
hibernate_time_s = time_s; hibernate_time_s = time_s;
/* clear ticks */
since_aprs_s += tick;
} }
/** /**
* Interrupt for RTC, called at 1Hz * Interrupt for RTC, called at 1Hz
@ -112,7 +109,6 @@ void RTC_Handler(void)
/* Check sleep time */ /* Check sleep time */
if (tick >= hibernate_time_s) { if (tick >= hibernate_time_s) {
/* clear ticks */ /* clear ticks */
since_aprs_s += tick;
tick = 0; tick = 0;
/* set hibernate time to max */ /* set hibernate time to max */
@ -124,6 +120,7 @@ void RTC_Handler(void)
} else { } else {
/* Increment tick */ /* Increment tick */
tick++; tick++;
since_aprs_s++;
} }
} }
} }