mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Added blocked dshot commands, Added post command delay
Moved the dshotcommand to happen in pwm_output_dshot. Simplified the timing and repeats to happen on a group basis instead works better for dshotburst
This commit is contained in:
parent
f37a8184d5
commit
0045b36320
8 changed files with 131 additions and 42 deletions
|
@ -2891,7 +2891,7 @@ static void executeEscInfoCommand(uint8_t escIndex)
|
|||
|
||||
startEscDataRead(escInfoBuffer, ESC_INFO_BLHELI32_EXPECTED_FRAME_SIZE);
|
||||
|
||||
pwmWriteDshotCommand(escIndex, getMotorCount(), DSHOT_CMD_ESC_INFO);
|
||||
pwmWriteDshotCommand(escIndex, getMotorCount(), DSHOT_CMD_ESC_INFO, true);
|
||||
|
||||
delay(10);
|
||||
|
||||
|
@ -2938,7 +2938,7 @@ static void cliDshotProg(char *cmdline)
|
|||
}
|
||||
|
||||
if (command != DSHOT_CMD_ESC_INFO) {
|
||||
pwmWriteDshotCommand(escIndex, getMotorCount(), command);
|
||||
pwmWriteDshotCommand(escIndex, getMotorCount(), command, true);
|
||||
} else {
|
||||
#if defined(USE_ESC_SENSOR) && defined(USE_ESC_SENSOR_INFO)
|
||||
if (feature(FEATURE_ESC_SENSOR)) {
|
||||
|
@ -2958,9 +2958,6 @@ static void cliDshotProg(char *cmdline)
|
|||
|
||||
cliPrintLinef("Command Sent: %d", command);
|
||||
|
||||
if (command <= 5) {
|
||||
delay(20); // wait for sound output to finish
|
||||
}
|
||||
} else {
|
||||
cliPrintErrorLinef("Invalid command. Range: 1 - %d.", DSHOT_MIN_THROTTLE - 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue