File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -614,6 +614,21 @@ static void * beacon_thread (void *arg)
614
614
/* i.e. Don't take relative to now in case there was some delay. */
615
615
616
616
bp -> next += bp -> every ;
617
+
618
+ // https://github.com/wb2osz/direwolf/pull/301
619
+ // https://github.com/wb2osz/direwolf/pull/301
620
+ // This happens with a portable system with no Internet connection.
621
+ // On reboot, the time is in the past.
622
+ // After time gets set from GPS, all beacons from that interval are sent.
623
+ // FIXME: This will surely break time slotted scheduling.
624
+
625
+ /* craigerl: if next beacon is scheduled in the past, then set next beacon relative to now (happens when NTP pushes clock AHEAD) */
626
+ /* fixme: if NTP sets clock BACK an hour, this thread will sleep for that hour */
627
+ if ( bp -> next < now ) {
628
+ bp -> next = now + bp -> every ;
629
+ text_color_set (DW_COLOR_INFO );
630
+ dw_printf ("\nSystem clock appears to have jumped forward. Beacon schedule updated.\n\n" );
631
+ }
617
632
}
618
633
619
634
} /* if time to send it */
You can’t perform that action at this time.
0 commit comments