From 8b2f85756afb4ed8c7869835ccf836c9b6f2102d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 1 Nov 2021 18:16:41 +1100 Subject: [PATCH] AP_HAL_ChibiOS: instantiate SIMState object in HAL --- libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp index 41f90b71c7..fc90bd369a 100644 --- a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp +++ b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp @@ -34,6 +34,7 @@ #include #endif #include +#include #include @@ -97,6 +98,10 @@ static ChibiOS::Scheduler schedulerInstance; static ChibiOS::Util utilInstance; static Empty::OpticalFlow opticalFlowDriver; +#if AP_SIM_ENABLED +static AP_HAL::SIMState xsimstate; +#endif + #if HAL_WITH_DSP static ChibiOS::DSP dspDriver; #else @@ -152,6 +157,9 @@ HAL_ChibiOS::HAL_ChibiOS() : &utilInstance, &opticalFlowDriver, &flashDriver, +#if AP_SIM_ENABLED + &xsimstate, +#endif &dspDriver, #if HAL_NUM_CAN_IFACES (AP_HAL::CANIface**)canDrivers