Skip to content

Commit

Permalink
Extended Bidir Dshot
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Jul 24, 2022
1 parent 1c77543 commit f432ea6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/js/tabs/motors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down Expand Up @@ -1071,7 +1081,7 @@ motors.initialize = async function (callback) {
telemetryText += "</span>";
}

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);
Expand Down

0 comments on commit f432ea6

Please sign in to comment.