Skip to content

Commit

Permalink
AP_HAL_SITL: split to MicroStrain5
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 authored and tridge committed Aug 29, 2023
1 parent 0b27d17 commit fd3a1d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions libraries/AP_HAL_SITL/SITL_State_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_SITL/SITL_State_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd3a1d4

Please sign in to comment.