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:
Beat Küng 2017-03-03 10:18:15 +01:00 committed by Lorenz Meier
parent 01541bb10d
commit eaa9e6a019

View File

@ -924,7 +924,7 @@ void Ekf2::task_main()
// 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
struct vehicle_attitude_s att = {};
att.timestamp = 0;
att.timestamp = now;
if (_att_pub == nullptr) {
_att_pub = orb_advertise(ORB_ID(vehicle_attitude), &att);