AP_BLHeli: if there are no digital outputs disable telemetry

This commit is contained in:
Andy Piper 2021-05-15 09:48:14 +01:00 committed by Andrew Tridgell
parent dd42e45079
commit 4929caa241
1 changed files with 5 additions and 1 deletions

View File

@ -1492,6 +1492,10 @@ void AP_BLHeli::log_bidir_telemetry(void)
} }
} }
if (!SRV_Channels::have_digital_outputs()) {
return;
}
// ask the next ESC for telemetry // ask the next ESC for telemetry
uint8_t idx_pos = last_telem_esc; uint8_t idx_pos = last_telem_esc;
for (uint8_t idx = (idx_pos + 1) % num_motors; for (uint8_t idx = (idx_pos + 1) % num_motors;
@ -1517,7 +1521,7 @@ void AP_BLHeli::update_telemetry(void)
log_bidir_telemetry(); log_bidir_telemetry();
} }
#endif #endif
if (!telem_uart) { if (!telem_uart || !SRV_Channels::have_digital_outputs()) {
return; return;
} }
uint32_t now = AP_HAL::micros(); uint32_t now = AP_HAL::micros();