mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Fix Fast PWM synced update for non ONESHOT125
This commit is contained in:
parent
bb880e68d3
commit
77dc19e9d9
3 changed files with 5 additions and 5 deletions
|
@ -633,7 +633,7 @@ void writeServos(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void writeMotors(uint8_t unsyncedPwm)
|
void writeMotors(uint8_t fastPwmProtocol, uint8_t unsyncedPwm)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ void writeMotors(uint8_t unsyncedPwm)
|
||||||
pwmWriteMotor(i, motor[i]);
|
pwmWriteMotor(i, motor[i]);
|
||||||
|
|
||||||
|
|
||||||
if (feature(FEATURE_ONESHOT125) && !unsyncedPwm) {
|
if (fastPwmProtocol && !unsyncedPwm) {
|
||||||
pwmCompleteOneshotMotorUpdate(motorCount);
|
pwmCompleteOneshotMotorUpdate(motorCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -653,7 +653,7 @@ void writeAllMotors(int16_t mc)
|
||||||
// Sends commands to all motors
|
// Sends commands to all motors
|
||||||
for (i = 0; i < motorCount; i++)
|
for (i = 0; i < motorCount; i++)
|
||||||
motor[i] = mc;
|
motor[i] = mc;
|
||||||
writeMotors(1);
|
writeMotors(1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopMotors(void)
|
void stopMotors(void)
|
||||||
|
|
|
@ -213,6 +213,6 @@ int servoDirection(int servoIndex, int fromChannel);
|
||||||
#endif
|
#endif
|
||||||
void mixerResetDisarmedMotors(void);
|
void mixerResetDisarmedMotors(void);
|
||||||
void mixTable(void);
|
void mixTable(void);
|
||||||
void writeMotors(uint8_t unsyncedPwm);
|
void writeMotors(uint8_t fastPwmProtocol, uint8_t unsyncedPwm);
|
||||||
void stopMotors(void);
|
void stopMotors(void);
|
||||||
void StopPwmAllMotors(void);
|
void StopPwmAllMotors(void);
|
||||||
|
|
|
@ -742,7 +742,7 @@ void subTaskMotorUpdate(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (motorControlEnable) {
|
if (motorControlEnable) {
|
||||||
writeMotors(masterConfig.use_unsyncedPwm);
|
writeMotors(masterConfig.fast_pwm_protocol, masterConfig.use_unsyncedPwm);
|
||||||
}
|
}
|
||||||
if (debugMode == DEBUG_PIDLOOP) {debug[3] = micros() - startTime;}
|
if (debugMode == DEBUG_PIDLOOP) {debug[3] = micros() - startTime;}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue