1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00

Merge pull request #9712 from etracer65/fix_blocking_dshot_command

Fix blocking DSHOT commands
This commit is contained in:
Michael Keller 2020-04-20 23:07:40 +12:00 committed by GitHub
commit e060a0d507
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 21 deletions

View file

@ -3803,7 +3803,7 @@ static void executeEscInfoCommand(const char *cmdName, uint8_t escIndex)
startEscDataRead(escInfoBuffer, ESC_INFO_BLHELI32_EXPECTED_FRAME_SIZE);
dshotCommandWrite(escIndex, getMotorCount(), DSHOT_CMD_ESC_INFO, true);
dshotCommandWrite(escIndex, getMotorCount(), DSHOT_CMD_ESC_INFO, DSHOT_CMD_TYPE_BLOCKING);
delay(10);
@ -3811,9 +3811,6 @@ static void executeEscInfoCommand(const char *cmdName, uint8_t escIndex)
}
#endif // USE_ESC_SENSOR && USE_ESC_SENSOR_INFO
// XXX Review dshotprog command under refactored motor handling
static void cliDshotProg(const char *cmdName, char *cmdline)
{
if (isEmpty(cmdline) || !isMotorProtocolDshot()) {
@ -3854,7 +3851,7 @@ static void cliDshotProg(const char *cmdName, char *cmdline)
}
if (command != DSHOT_CMD_ESC_INFO) {
dshotCommandWrite(escIndex, getMotorCount(), command, true);
dshotCommandWrite(escIndex, getMotorCount(), command, DSHOT_CMD_TYPE_BLOCKING);
} else {
#if defined(USE_ESC_SENSOR) && defined(USE_ESC_SENSOR_INFO)
if (featureIsEnabled(FEATURE_ESC_SENSOR)) {