mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Tidy of mixer code. Remove motorCount extern
This commit is contained in:
parent
1475138e75
commit
ae1944b78c
7 changed files with 71 additions and 61 deletions
|
@ -101,7 +101,7 @@ static void pwmWriteMultiShot(uint8_t index, uint16_t value)
|
|||
|
||||
void pwmWriteMotor(uint8_t index, uint16_t value)
|
||||
{
|
||||
if (index < MAX_SUPPORTED_MOTORS && pwmMotorsEnabled && motors[index].pwmWritePtr) {
|
||||
if (motors[index].pwmWritePtr) {
|
||||
motors[index].pwmWritePtr(index, value);
|
||||
}
|
||||
}
|
||||
|
@ -127,6 +127,11 @@ void pwmEnableMotors(void)
|
|||
pwmMotorsEnabled = true;
|
||||
}
|
||||
|
||||
bool pwmAreMotorsEnabled(void)
|
||||
{
|
||||
return pwmMotorsEnabled;
|
||||
}
|
||||
|
||||
static void pwmCompleteOneshotMotorUpdate(uint8_t motorCount)
|
||||
{
|
||||
for (int index = 0; index < motorCount; index++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue