mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Isolate MSP_MOTOR from pwm_output (pwmGetMotors)
This commit is contained in:
parent
b310f9b348
commit
11994e6ab8
5 changed files with 21 additions and 2 deletions
|
@ -144,6 +144,11 @@ bool pwmEnableMotors(void)
|
|||
return (motorPwmVTable.write != &pwmWriteUnused);
|
||||
}
|
||||
|
||||
bool pwmIsMotorEnabled(uint8_t index)
|
||||
{
|
||||
return motors[index].enabled;
|
||||
}
|
||||
|
||||
static void pwmCompleteOneshotMotorUpdate(void)
|
||||
{
|
||||
for (int index = 0; index < motorPwmDevice.count; index++) {
|
||||
|
@ -169,6 +174,7 @@ static uint16_t pwmConvertToExternal(float motorValue)
|
|||
static motorVTable_t motorPwmVTable = {
|
||||
.enable = pwmEnableMotors,
|
||||
.disable = pwmDisableMotors,
|
||||
.isMotorEnabled = pwmIsMotorEnabled,
|
||||
.shutdown = pwmShutdownPulsesForAllMotors,
|
||||
.convertExternalToMotor = pwmConvertFromExternal,
|
||||
.convertMotorToExternal = pwmConvertToExternal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue