mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +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:
@@ -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 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{};
|
timespec ts{};
|
||||||
|
|
||||||
// get the whole microseconds
|
// get the whole microseconds
|
||||||
|
|||||||
Reference in New Issue
Block a user