mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
fix(mavlink): fix gps utc timestamp
This commit is contained in:
@@ -68,7 +68,7 @@ private:
|
|||||||
hrt_abstime now{};
|
hrt_abstime now{};
|
||||||
|
|
||||||
if (_sensor_gps_sub.update(&gps)) {
|
if (_sensor_gps_sub.update(&gps)) {
|
||||||
if (gps.time_utc_usec > 0) {
|
if (gps.time_utc_usec <= 0) {
|
||||||
msg.time_usec = gps.timestamp;
|
msg.time_usec = gps.timestamp;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ private:
|
|||||||
hrt_abstime now{};
|
hrt_abstime now{};
|
||||||
|
|
||||||
if (_sensor_gps_sub.update(&gps)) {
|
if (_sensor_gps_sub.update(&gps)) {
|
||||||
if (gps.time_utc_usec > 0) {
|
if (gps.time_utc_usec <= 0) {
|
||||||
msg.time_usec = gps.timestamp;
|
msg.time_usec = gps.timestamp;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user