Merge pull request #1526 from blckmn/esc4way_dshot
Fix for esc4way and dshot
This commit is contained in:
commit
996b1a4aa9
|
@ -120,6 +120,7 @@ void pwmShutdownPulsesForAllMotors(uint8_t motorCount)
|
||||||
|
|
||||||
void pwmDisableMotors(void)
|
void pwmDisableMotors(void)
|
||||||
{
|
{
|
||||||
|
pwmShutdownPulsesForAllMotors(MAX_SUPPORTED_MOTORS);
|
||||||
pwmMotorsEnabled = false;
|
pwmMotorsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +217,8 @@ void motorInit(const motorConfig_t *motorConfig, uint16_t idlePulse, uint8_t mot
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
motors[motorIndex].io = IOGetByTag(tag);
|
||||||
|
|
||||||
#ifdef USE_DSHOT
|
#ifdef USE_DSHOT
|
||||||
if (isDigital) {
|
if (isDigital) {
|
||||||
pwmDigitalMotorHardwareConfig(timerHardware, motorIndex, motorConfig->motorPwmProtocol);
|
pwmDigitalMotorHardwareConfig(timerHardware, motorIndex, motorConfig->motorPwmProtocol);
|
||||||
|
@ -224,7 +227,6 @@ void motorInit(const motorConfig_t *motorConfig, uint16_t idlePulse, uint8_t mot
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
motors[motorIndex].io = IOGetByTag(tag);
|
|
||||||
|
|
||||||
IOInit(motors[motorIndex].io, OWNER_MOTOR, RESOURCE_OUTPUT, RESOURCE_INDEX(motorIndex));
|
IOInit(motors[motorIndex].io, OWNER_MOTOR, RESOURCE_OUTPUT, RESOURCE_INDEX(motorIndex));
|
||||||
IOConfigGPIO(motors[motorIndex].io, IOCFG_AF_PP);
|
IOConfigGPIO(motors[motorIndex].io, IOCFG_AF_PP);
|
||||||
|
|
Loading…
Reference in New Issue