-
Notifications
You must be signed in to change notification settings - Fork 321
Open
Description
If the system clock jumps forward, direwolf will continuously transmit TBEACONS over and over that were scheduled during the missing time, jamming the channel. We saw this with PBEACON (see PBEACONS gone wild). Adding the same fix, below, should do the trick. This situation is common in a raspberry pi environment, when direwolf starts before the GPS gets the time, or before network connections are established.
beacon.c
else {
/* Stay with the schedule. */
/* Important for slotted. Might reconsider otherwise. */
bp->next += bp->every;
+ if ( bp->next < now ) {
+ bp->next = now + bp->every;
+ text_color_set(DW_COLOR_INFO);
+ dw_printf("\nSystem clock appears to have jumped forward. Beacon schedule updated.\n\n")
+ }
}
}
else if (g_misc_config_p->sb_configured) {
and
bp->next = sb_calculate_next_time (now,
DW_KNOTS_TO_MPH(gpsinfo.speed_knots), gpsinfo.track,
sb_prev_time, sb_prev_course);
}
else {
/* Tracker beacon, fixed spacing. */
bp->next += bp->every;
+ if ( bp->next < now ) {
+ bp->next = now + bp->every;
+ text_color_set(DW_COLOR_INFO);
+ dw_printf("\nSystem clock appears to have jumped forward. Beacon schedule updated.\n\n");
+ }
}
}
-craig
KM6LYW
Metadata
Metadata
Assignees
Labels
No labels