mirror of
https://github.com/betaflight/betaflight.git
synced 2025-04-06 23:55:41 +03:00
fix: missing sitl motor count (#14319)
- other platforms set it, sitl does not and configurator complains
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user