1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

Runaway Takeoff Prevention - temporarily disable during configurator bench testing

Temporarily disables Runaway Takeoff Prevention when the `ARMING_DISABLED_MSP` flag is cleared in the configurator by switching the safety switch on the motors tab.  Allows bench testing the motors and flight controller response without triggering a runaway takeoff auto-disarm.

Requires coordination with the configurator to pass an extra runaway takeoff temporary disable flag with the MSP_ARMING_DISABLE msp command.
This commit is contained in:
Bruce Luckcuck 2018-02-12 10:17:47 -05:00
parent 9da7416c30
commit 17aeaa3ee0
3 changed files with 23 additions and 0 deletions

View file

@ -1777,13 +1777,23 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
case MSP_SET_ARMING_DISABLED:
{
const uint8_t command = sbufReadU8(src);
uint8_t disableRunawayTakeoff = 0;
if (sbufBytesRemaining(src)) {
disableRunawayTakeoff = sbufReadU8(src);
}
if (command) {
setArmingDisabled(ARMING_DISABLED_MSP);
if (ARMING_FLAG(ARMED)) {
disarm();
}
#ifdef USE_RUNAWAY_TAKEOFF
runawayTakeoffTemporaryDisable(false);
#endif
} else {
unsetArmingDisabled(ARMING_DISABLED_MSP);
#ifdef USE_RUNAWAY_TAKEOFF
runawayTakeoffTemporaryDisable(disableRunawayTakeoff);
#endif
}
}
break;