mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
uavcan: ignore 0 UTC timestamps (#24529)
We need to wait for a valid UTC timestamp, otherwise we end up in 1970 with Here 4 which sends 0 for a bit even if there is already a fix.
This commit is contained in:
parent
b6597f2984
commit
d72c2cc378
@ -453,7 +453,7 @@ void UavcanGnssBridge::process_fixx(const uavcan::ReceivedDataStructure<FixType>
|
||||
}
|
||||
|
||||
// If we haven't already done so, set the system clock using GPS data
|
||||
if ((fix_type >= sensor_gps_s::FIX_TYPE_2D) && !_system_clock_set) {
|
||||
if (report.time_utc_usec != 0 && (fix_type >= sensor_gps_s::FIX_TYPE_2D) && !_system_clock_set) {
|
||||
timespec ts{};
|
||||
|
||||
// get the whole microseconds
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user