1
0
Fork 0
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:
Martin Budden 2017-07-04 20:44:33 +01:00
parent ea896e5445
commit 3cdbaaf14d
6 changed files with 8 additions and 16 deletions

View file

@ -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);
}