From c52298352ae4757554a5b8fd7d0a044fe4ec1dfe Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 23 Sep 2020 11:03:51 +1000 Subject: [PATCH] AP_HAL_SITL: add simulator for IntelligentEnergy 2.4kWh --- libraries/AP_HAL_SITL/SITL_State.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_HAL_SITL/SITL_State.cpp b/libraries/AP_HAL_SITL/SITL_State.cpp index 1e105278ce..48bb041c9e 100644 --- a/libraries/AP_HAL_SITL/SITL_State.cpp +++ b/libraries/AP_HAL_SITL/SITL_State.cpp @@ -355,6 +355,9 @@ int SITL_State::sim_fd(const char *name, const char *arg) } else if (streq(name, "richenpower")) { sitl_model->set_richenpower(&_sitl->richenpower_sim); return _sitl->richenpower_sim.fd(); + } else if (streq(name, "ie24")) { + sitl_model->set_ie24(&_sitl->ie24_sim); + return _sitl->ie24_sim.fd(); } else if (streq(name, "gyus42v2")) { if (gyus42v2 != nullptr) { AP_HAL::panic("Only one gyus42v2 at a time"); @@ -459,6 +462,8 @@ int SITL_State::sim_fd_write(const char *name) return rplidara2->write_fd(); } else if (streq(name, "richenpower")) { return _sitl->richenpower_sim.write_fd(); + } else if (streq(name, "ie24")) { + return _sitl->ie24_sim.write_fd(); } else if (streq(name, "gyus42v2")) { if (gyus42v2 == nullptr) { AP_HAL::panic("No gyus42v2 created");