AP_HAL: add Volz simulator

This commit is contained in:
Peter Barker 2025-01-11 12:44:51 +11:00 committed by Peter Barker
parent ed626f57aa
commit b43410a021

View File

@ -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;