mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 14:48:28 -04:00
AP_HAL: add Volz simulator
This commit is contained in:
parent
ed626f57aa
commit
b43410a021
@ -345,6 +345,19 @@ void SIMState::_simulator_servos(struct sitl_input &input)
|
||||
}
|
||||
}
|
||||
|
||||
#if AP_SIM_VOLZ_ENABLED
|
||||
// update simulation input based on data received via "serial" to
|
||||
// Volz servos:
|
||||
if (_sitl->volz_sim.enabled()) {
|
||||
_sitl->volz_sim.update_sitl_input_pwm(input);
|
||||
for (uint8_t i=0; i<ARRAY_SIZE(input.servos); i++) {
|
||||
if (input.servos[i] != 0 && input.servos[i] < 1000) {
|
||||
AP_HAL::panic("Bad input servo value (%u)", input.servos[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
float voltage = 0;
|
||||
_current = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user