mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
FIX: Serial ESC communication when using digital protocols (#14214)
* FIX: Serial ESC communication when using digital protocols * Fix error following rebase, and amending based on comments from @ledvinap
This commit is contained in:
parent
b277364b2c
commit
cd84e10fa5
12 changed files with 100 additions and 62 deletions
|
@ -126,6 +126,14 @@ static bool dshotPwmIsMotorEnabled(unsigned index)
|
|||
return motors[index].enabled;
|
||||
}
|
||||
|
||||
static IO_t pwmDshotGetMotorIO(unsigned index)
|
||||
{
|
||||
if (index >= dshotMotorCount) {
|
||||
return IO_NONE;
|
||||
}
|
||||
return motors[index].io;
|
||||
}
|
||||
|
||||
static FAST_CODE void dshotWriteInt(uint8_t index, uint16_t value)
|
||||
{
|
||||
pwmWriteDshotInt(index, value);
|
||||
|
@ -150,6 +158,7 @@ static const motorVTable_t dshotPwmVTable = {
|
|||
.shutdown = dshotPwmShutdown,
|
||||
.requestTelemetry = pwmDshotRequestTelemetry,
|
||||
.isMotorIdle = pwmDshotIsMotorIdle,
|
||||
.getMotorIO = pwmDshotGetMotorIO,
|
||||
};
|
||||
|
||||
bool dshotPwmDevInit(motorDevice_t *device, const motorDevConfig_t *motorConfig)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue