mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
fix: missing sitl motor count (#14319)
- other platforms set it, sitl does not and configurator complains
This commit is contained in:
parent
ad58b69c20
commit
06844745f6
1 changed files with 6 additions and 4 deletions
|
@ -644,14 +644,16 @@ bool motorPwmDevInit(motorDevice_t *device, const motorDevConfig_t *motorConfig,
|
|||
if (!device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pwmMotorCount = device->count;
|
||||
device->vTable = &vTable;
|
||||
const uint8_t motorCount = device->count;
|
||||
printf("Initialized motor count %d\n", motorCount);
|
||||
pwmRawPkt.motorCount = motorCount;
|
||||
|
||||
printf("Initialized motor count %d\n", pwmMotorCount);
|
||||
pwmRawPkt.motorCount = pwmMotorCount;
|
||||
|
||||
idlePulse = _idlePulse;
|
||||
|
||||
for (int motorIndex = 0; motorIndex < MAX_SUPPORTED_MOTORS && motorIndex < motorCount; motorIndex++) {
|
||||
for (int motorIndex = 0; motorIndex < MAX_SUPPORTED_MOTORS && motorIndex < pwmMotorCount; motorIndex++) {
|
||||
pwmMotors[motorIndex].enabled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue