mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
fix simulator_mavlink: orb_copy requires a valid data pointer
orb_copy() just returns if data==nullptr. Fixes lockstep for ekf2. estimator_status.time_slip now stays constant after startup, even with high speedup factor and high system load.
This commit is contained in:
parent
30edcad752
commit
0542ac0e5f
@ -654,7 +654,8 @@ void Simulator::send()
|
||||
}
|
||||
|
||||
if (fds_ekf2_timestamps[0].revents & POLLIN) {
|
||||
orb_copy(ORB_ID(ekf2_timestamps), _ekf2_timestamps_sub, nullptr);
|
||||
ekf2_timestamps_s timestamps;
|
||||
orb_copy(ORB_ID(ekf2_timestamps), _ekf2_timestamps_sub, ×tamps);
|
||||
state = State::WaitingForActuatorControls;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user