mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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) {
|
||||
/* check GPS topic to get GPS time */
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user