From f432ea671160dbe30d0689f050e3c96d4fe79a47 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sun, 24 Jul 2022 00:10:21 +0200 Subject: [PATCH] Extended Bidir Dshot --- src/js/tabs/motors.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/js/tabs/motors.js b/src/js/tabs/motors.js index 767bef69bc..be93775431 100644 --- a/src/js/tabs/motors.js +++ b/src/js/tabs/motors.js @@ -904,6 +904,16 @@ motors.initialize = async function (callback) { } if (enabled) { + // Send enable extended dshot telemetry command + const buffer = []; + + buffer.push8(DshotCommand.dshotCommandType_e.DSHOT_CMD_TYPE_BLOCKING); + buffer.push8(255); // Send to all escs + buffer.push8(1); // 1 command + buffer.push8(13); // Enable extended dshot telemetry + + MSP.send_message(MSPCodes.MSP2_SEND_DSHOT_COMMAND, buffer); + document.addEventListener('keydown', e => disableMotorTest(e)); } @@ -1071,7 +1081,7 @@ motors.initialize = async function (callback) { telemetryText += ""; } - if (FC.MOTOR_CONFIG.use_esc_sensor) { + if (FC.MOTOR_CONFIG.use_dshot_telemetry || FC.MOTOR_CONFIG.use_esc_sensor) { let escTemperature = FC.MOTOR_TELEMETRY_DATA.temperature[i]; escTemperature = escTemperature.toString().padStart(MAX_VALUE_SIZE);