mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
AP_HAL_SITL: split to MicroStrain5
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
parent
0b27d17b81
commit
fd3a1d448a
@ -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
|
||||
|
@ -189,7 +189,7 @@ public:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user