Skip to content

Commit

Permalink
drivers/uavcan: GNSS set system time based on fix_type instead of val…
Browse files Browse the repository at this point in the history
…id_pos_cov
  • Loading branch information
AlexKlimaj authored Jun 28, 2024
1 parent 58f7c3e commit 053b4a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/uavcan/sensors/gnss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 053b4a4

Please sign in to comment.