forked from Archive/PX4-Autopilot
Fix sdlog2 GPS time copy for log_on_start situation
This commit is contained in:
parent
8c638d2add
commit
4cd66a3242
|
@ -1070,7 +1070,7 @@ int sdlog2_thread_main(int argc, char *argv[])
|
||||||
if (log_on_start) {
|
if (log_on_start) {
|
||||||
/* check GPS topic to get GPS time */
|
/* check GPS topic to get GPS time */
|
||||||
if (log_name_timestamp) {
|
if (log_name_timestamp) {
|
||||||
if (copy_if_updated(ORB_ID(vehicle_gps_position), subs.gps_pos_sub, &buf_gps_pos)) {
|
if (!orb_copy(ORB_ID(vehicle_gps_position), subs.gps_pos_sub, &buf_gps_pos)) {
|
||||||
gps_time = buf_gps_pos.time_gps_usec;
|
gps_time = buf_gps_pos.time_gps_usec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue