AP_HAL_SITL: split to MicroStrain5

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
Ryan Friedman 2023-08-27 20:24:17 -06:00 committed by Andrew Tridgell
parent 0b27d17b81
commit fd3a1d448a
2 changed files with 8 additions and 8 deletions

View File

@ -238,12 +238,12 @@ SITL::SerialDevice *SITL_State_Common::create_serial_sim(const char *name, const
} }
vectornav = new SITL::VectorNav(); vectornav = new SITL::VectorNav();
return vectornav; return vectornav;
} else if (streq(name, "MicroStrain")) { } else if (streq(name, "MicroStrain5")) {
if (microstrain != nullptr) { if (microstrain5 != nullptr) {
AP_HAL::panic("Only one MicroStrain at a time"); AP_HAL::panic("Only one MicroStrain5 at a time");
} }
microstrain = new SITL::MicroStrain(); microstrain5 = new SITL::MicroStrain5();
return microstrain; return microstrain5;
#if HAL_SIM_AIS_ENABLED #if HAL_SIM_AIS_ENABLED
} else if (streq(name, "AIS")) { } else if (streq(name, "AIS")) {
if (ais != nullptr) { if (ais != nullptr) {
@ -394,8 +394,8 @@ void SITL_State_Common::sim_update(void)
vectornav->update(); vectornav->update();
} }
if (microstrain != nullptr) { if (microstrain5 != nullptr) {
microstrain->update(); microstrain5->update();
} }
#if HAL_SIM_AIS_ENABLED #if HAL_SIM_AIS_ENABLED

View File

@ -189,7 +189,7 @@ public:
SITL::VectorNav *vectornav; SITL::VectorNav *vectornav;
// simulated LORD MicroStrain system // simulated LORD MicroStrain system
SITL::MicroStrain *microstrain; SITL::MicroStrain5 *microstrain5;
#if HAL_SIM_JSON_MASTER_ENABLED #if HAL_SIM_JSON_MASTER_ENABLED
// Ride along instances via JSON SITL backend // Ride along instances via JSON SITL backend