From fd3a1d448a369f5790e761df771f3a4f74e1e21f Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Sun, 27 Aug 2023 20:24:17 -0600 Subject: [PATCH] AP_HAL_SITL: split to MicroStrain5 Signed-off-by: Ryan Friedman --- libraries/AP_HAL_SITL/SITL_State_common.cpp | 14 +++++++------- libraries/AP_HAL_SITL/SITL_State_common.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/AP_HAL_SITL/SITL_State_common.cpp b/libraries/AP_HAL_SITL/SITL_State_common.cpp index c9dd4189940d4..89288310ea2c0 100644 --- a/libraries/AP_HAL_SITL/SITL_State_common.cpp +++ b/libraries/AP_HAL_SITL/SITL_State_common.cpp @@ -238,12 +238,12 @@ SITL::SerialDevice *SITL_State_Common::create_serial_sim(const char *name, const } vectornav = new SITL::VectorNav(); return vectornav; - } else if (streq(name, "MicroStrain")) { - if (microstrain != nullptr) { - AP_HAL::panic("Only one MicroStrain at a time"); + } else if (streq(name, "MicroStrain5")) { + if (microstrain5 != nullptr) { + AP_HAL::panic("Only one MicroStrain5 at a time"); } - microstrain = new SITL::MicroStrain(); - return microstrain; + microstrain5 = new SITL::MicroStrain5(); + return microstrain5; #if HAL_SIM_AIS_ENABLED } else if (streq(name, "AIS")) { if (ais != nullptr) { @@ -394,8 +394,8 @@ void SITL_State_Common::sim_update(void) vectornav->update(); } - if (microstrain != nullptr) { - microstrain->update(); + if (microstrain5 != nullptr) { + microstrain5->update(); } #if HAL_SIM_AIS_ENABLED diff --git a/libraries/AP_HAL_SITL/SITL_State_common.h b/libraries/AP_HAL_SITL/SITL_State_common.h index dbbe4ef2e5139..1d4555ccd9b67 100644 --- a/libraries/AP_HAL_SITL/SITL_State_common.h +++ b/libraries/AP_HAL_SITL/SITL_State_common.h @@ -189,7 +189,7 @@ class HALSITL::SITL_State_Common { SITL::VectorNav *vectornav; // simulated LORD MicroStrain system - SITL::MicroStrain *microstrain; + SITL::MicroStrain5 *microstrain5; #if HAL_SIM_JSON_MASTER_ENABLED // Ride along instances via JSON SITL backend