kopia lustrzana https://github.com/bristol-seds/pico-tracker
[Ooops] Fixed underflow
rodzic
7a94195d95
commit
84b243b772
|
@ -152,9 +152,9 @@ void cron_telemetry(struct tracker_time* t)
|
||||||
void do_cron(void)
|
void do_cron(void)
|
||||||
{
|
{
|
||||||
/* ---- Local representation of the time ---- */
|
/* ---- Local representation of the time ---- */
|
||||||
while (ticks--) {
|
while (ticks) {
|
||||||
/* Update time internally */
|
/* Update time internally */
|
||||||
time.epoch++; time.second++;
|
ticks--; time.epoch++; time.second++;
|
||||||
if (time.second >= 60) {
|
if (time.second >= 60) {
|
||||||
time.second = 0; time.minute++;
|
time.second = 0; time.minute++;
|
||||||
if (time.minute >= 60) {
|
if (time.minute >= 60) {
|
||||||
|
|
Ładowanie…
Reference in New Issue