AP_HAL: add support for Plane SITL-on-hw

This commit is contained in:
Peter Barker 2022-05-23 14:06:18 +10:00 committed by Andrew Tridgell
parent 0f48557ec2
commit 16883565e2
2 changed files with 8 additions and 5 deletions

View File

@ -9,6 +9,9 @@
*/
#include <SITL/SIM_Multicopter.h>
#include <SITL/SIM_Plane.h>
#include <AP_Baro/AP_Baro.h>
extern const AP_HAL::HAL& hal;
@ -21,7 +24,11 @@ void SIMState::update()
static bool init_done;
if (!init_done) {
init_done = true;
#if APM_BUILD_TYPE(APM_BUILD_ArduCopter)
sitl_model = SITL::MultiCopter::create("+");
#elif APM_BUILD_TYPE(APM_BUILD_ArduPlane)
sitl_model = SITL::Plane::create("plane");
#endif
}
_fdm_input_step();

View File

@ -6,10 +6,6 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_InertialSensor/AP_InertialSensor.h>
#include <AP_Compass/AP_Compass.h>
#include <AP_Terrain/AP_Terrain.h>
#include <SITL/SITL_Input.h>
#include <SITL/SIM_Gimbal.h>
#include <SITL/SIM_ADSB.h>
@ -90,7 +86,7 @@ private:
pid_t _parent_pid;
uint32_t _update_count;
AP_Baro *_barometer;
class AP_Baro *_barometer;
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
SocketAPM _sitl_rc_in{true};