Skip to content

Commit

Permalink
ekf2: don't timeout in HITL mode
Browse files Browse the repository at this point in the history
Otherwise ekf2 might not start if HITL isn't started within 30 seconds.
  • Loading branch information
julianoes authored and dagar committed May 8, 2021
1 parent ac97b55 commit 29730e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/ekf2/EKF2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,8 @@ int EKF2::task_spawn(int argc, char *argv[])

while ((multi_instances_allocated < multi_instances)
&& (vehicle_status_sub.get().arming_state != vehicle_status_s::ARMING_STATE_ARMED)
&& (hrt_elapsed_time(&time_started) < 30_s)) {
&& ((hrt_elapsed_time(&time_started) < 30_s)
|| (vehicle_status_sub.get().hil_state == vehicle_status_s::HIL_STATE_ON))) {

vehicle_status_sub.update();

Expand Down

0 comments on commit 29730e3

Please sign in to comment.