mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
ekf2: set att.timestamp to now in replay mode before ekf is initialized
logger will always log this topic, and a 0 timestamp will look worse in FlightPlot. This will show a period of 0 attitude instead before ekf is initialized.
This commit is contained in:
@@ -924,7 +924,7 @@ void Ekf2::task_main()
|
|||||||
// in replay mode we have to tell the replay module not to wait for an update
|
// in replay mode we have to tell the replay module not to wait for an update
|
||||||
// we do this by publishing an attitude with zero timestamp
|
// we do this by publishing an attitude with zero timestamp
|
||||||
struct vehicle_attitude_s att = {};
|
struct vehicle_attitude_s att = {};
|
||||||
att.timestamp = 0;
|
att.timestamp = now;
|
||||||
|
|
||||||
if (_att_pub == nullptr) {
|
if (_att_pub == nullptr) {
|
||||||
_att_pub = orb_advertise(ORB_ID(vehicle_attitude), &att);
|
_att_pub = orb_advertise(ORB_ID(vehicle_attitude), &att);
|
||||||
|
|||||||
Reference in New Issue
Block a user