1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

Add support for emergency arming

Enabling and disabling the arming switch 10 times during a 10s
window will override checks for level, navigation unsafe, compass
not calibrated and some hardware failures (it will only enforce
gyro and acc to be working).

FLASH +224, RAM +24

Fixes #4489 and #4515
This commit is contained in:
Alberto García Hierro 2019-04-16 16:45:52 +01:00
parent 5192f3619c
commit ca3f21e7a1
3 changed files with 92 additions and 2 deletions

View file

@ -179,7 +179,9 @@ void processRcStickPositions(throttleStatus_e throttleStatus)
rcSticks = stTmp;
// perform actions
if (IS_RC_MODE_ACTIVE(BOXARM)) {
bool armingSwitchIsActive = IS_RC_MODE_ACTIVE(BOXARM);
emergencyArmingUpdate(armingSwitchIsActive);
if (armingSwitchIsActive) {
rcDisarmTimeMs = currentTimeMs;
tryArm();
} else {