fix(dshot): send motor stop for 3D mode deadzone instead of min throttle

In DShot 3D mode, convert_output_to_3d_scaling() returns DSHOT_DISARM_VALUE
(0) for deadzone inputs. But up_dshot_motor_data_set() adds the MIN_throttle
offset (+48), causing motors to spin at minimum throttle instead of stopping.

Check the result of calculate_output_value() for DSHOT_DISARM_VALUE and send
an explicit motor stop command, bypassing the +48 offset.
This commit is contained in:
Jacob Dahl
2026-03-17 16:55:21 -08:00
parent b597227da6
commit 3580632288
+9 -1
View File
@@ -368,7 +368,15 @@ void DShot::update_motor_outputs(uint16_t outputs[MAX_ACTUATORS], int num_output
up_dshot_motor_command(i, DSHOT_CMD_MOTOR_STOP, set_telemetry_bit);
} else {
up_dshot_motor_data_set(i, calculate_output_value(outputs[i], i), set_telemetry_bit);
uint16_t output = calculate_output_value(outputs[i], i);
// 3D deadzone: send motor stop to avoid MIN_throttle offset in up_dshot_motor_data_set
if (output == DSHOT_DISARM_VALUE) {
up_dshot_motor_command(i, DSHOT_CMD_MOTOR_STOP, set_telemetry_bit);
} else {
up_dshot_motor_data_set(i, output, set_telemetry_bit);
}
}
}
}