mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
HAL_SITL: support direct RC input
This commit is contained in:
parent
77f007ab27
commit
25de563687
@ -445,10 +445,21 @@ void SITL_State::_fdm_input_local(void)
|
|||||||
{
|
{
|
||||||
Aircraft::sitl_input input;
|
Aircraft::sitl_input input;
|
||||||
|
|
||||||
|
// check for direct RC input
|
||||||
|
_fdm_input();
|
||||||
|
|
||||||
|
// construct servos structure for FDM
|
||||||
_simulator_servos(input);
|
_simulator_servos(input);
|
||||||
|
|
||||||
|
// update the model
|
||||||
sitl_model->update(input);
|
sitl_model->update(input);
|
||||||
|
|
||||||
|
// get FDM output from the model
|
||||||
sitl_model->fill_fdm(_sitl->state);
|
sitl_model->fill_fdm(_sitl->state);
|
||||||
|
|
||||||
|
// update simulation time
|
||||||
hal.scheduler->stop_clock(_sitl->state.timestamp_us);
|
hal.scheduler->stop_clock(_sitl->state.timestamp_us);
|
||||||
|
|
||||||
_synthetic_clock_mode = true;
|
_synthetic_clock_mode = true;
|
||||||
_update_count++;
|
_update_count++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user