drivers/uavcan: GNSS set system time based on fix_type instead of valid_pos_cov

This commit is contained in:
Alex Klimaj
2024-06-27 21:35:45 -04:00
committed by GitHub
parent 58f7c3e9c9
commit 053b4a4423
+1 -1
View File
@@ -436,7 +436,7 @@ void UavcanGnssBridge::process_fixx(const uavcan::ReceivedDataStructure<FixType>
}
// If we haven't already done so, set the system clock using GPS data
if (valid_pos_cov && !_system_clock_set) {
if ((fix_type >= sensor_gps_s::FIX_TYPE_2D) && !_system_clock_set) {
timespec ts{};
// get the whole microseconds