dshot telemetry: enable telemetry publishing for setups with only one ESC

This commit is contained in:
Nicolas de Palezieux 2019-10-17 10:33:18 +02:00 committed by Beat Küng
parent 6ccb4af8b0
commit 40bb209fd2

View File

@ -598,7 +598,7 @@ void DShotOutput::handleNewTelemetryData(int motor_index, const DShotTelemetry::
}
// publish when motor index wraps (which is robust against motor timeouts)
if (motor_index < _telemetry->last_motor_index) {
if (motor_index <= _telemetry->last_motor_index) {
esc_status.timestamp = hrt_absolute_time();
esc_status.esc_connectiontype = esc_status_s::ESC_CONNECTION_TYPE_DSHOT;
esc_status.esc_count = _telemetry->handler.numMotors();