From 25de5636871444a6a0142509c3f6fbff2756873a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 2 May 2015 21:54:19 +1000 Subject: [PATCH] HAL_SITL: support direct RC input --- libraries/AP_HAL_AVR_SITL/SITL_State.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libraries/AP_HAL_AVR_SITL/SITL_State.cpp b/libraries/AP_HAL_AVR_SITL/SITL_State.cpp index 94571c2a8d..be63d189bd 100644 --- a/libraries/AP_HAL_AVR_SITL/SITL_State.cpp +++ b/libraries/AP_HAL_AVR_SITL/SITL_State.cpp @@ -445,10 +445,21 @@ void SITL_State::_fdm_input_local(void) { Aircraft::sitl_input input; + // check for direct RC input + _fdm_input(); + + // construct servos structure for FDM _simulator_servos(input); + + // update the model sitl_model->update(input); + + // get FDM output from the model sitl_model->fill_fdm(_sitl->state); + + // update simulation time hal.scheduler->stop_clock(_sitl->state.timestamp_us); + _synthetic_clock_mode = true; _update_count++; }