Skip to content

Commit

Permalink
AP_Vehicle: init safety state for SITL at boot
Browse files Browse the repository at this point in the history
This allows BRD_SAFETY_DEFLT=1 to work correctly for SITL.
  • Loading branch information
robertlong13 committed Jul 22, 2024
1 parent 56773f0 commit 75a9ed3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/AP_Vehicle/AP_Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ void AP_Vehicle::setup()
}
#endif

#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
// SITL needs the safety initialized manually if we want safety on at boot
hal.rcout->force_safety_on();
#endif

#if AP_SCHEDULER_ENABLED
// initialise the main loop scheduler
const AP_Scheduler::Task *tasks;
Expand Down

0 comments on commit 75a9ed3

Please sign in to comment.