AP_HAL_SITL: do not overwrite FETTecESC telemetry data w/SITL ESC data

This commit is contained in:
Peter Barker 2021-09-01 09:04:17 +10:00 committed by Andrew Tridgell
parent 42c2f8d9f3
commit 129eb4c184

View File

@ -85,6 +85,14 @@ void RCOutput::push(void)
memcpy(_sitlState->pwm_output, _pending, SITL_NUM_CHANNELS * sizeof(uint16_t));
_corked = false;
}
// do not overwrite FETTec simulation's ESC telemetry data:
SITL::SIM *sitl = AP::sitl();
if (sitl != nullptr &&
sitl->fetteconewireesc_sim.enabled()) {
return;
}
if (esc_telem == nullptr) {
esc_telem = new AP_ESC_Telem_SITL;
}