mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Remove duplication in motor enable/disable
This commit is contained in:
parent
ea896e5445
commit
3cdbaaf14d
6 changed files with 8 additions and 16 deletions
|
@ -108,7 +108,6 @@ int16_t magHold;
|
|||
|
||||
int16_t headFreeModeHold;
|
||||
|
||||
uint8_t motorControlEnable = false;
|
||||
static bool reverseMotors = false;
|
||||
static uint32_t disarmAt; // Time of automatic disarm when "Don't spin the motors when armed" is enabled and auto_disarm_delay is nonzero
|
||||
|
||||
|
@ -627,9 +626,8 @@ static void subTaskMotorUpdate(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (motorControlEnable) {
|
||||
writeMotors();
|
||||
}
|
||||
writeMotors();
|
||||
|
||||
DEBUG_SET(DEBUG_PIDLOOP, 3, micros() - startTime);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue