1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00

Fix fixed-wing auto-arming

This commit is contained in:
Konstantin (DigitalEntity) Sharlaimov 2019-07-09 20:57:22 +02:00
parent 6821ada395
commit 0246dd7c31

View file

@ -173,14 +173,24 @@ void processRcStickPositions(throttleStatus_e throttleStatus)
rcDelayCommand++;
}
}
} else
} else {
rcDelayCommand = 0;
}
rcSticks = stTmp;
// perform actions
bool armingSwitchIsActive = IS_RC_MODE_ACTIVE(BOXARM);
emergencyArmingUpdate(armingSwitchIsActive);
if (STATE(FIXED_WING) && feature(FEATURE_MOTOR_STOP) && armingConfig()->fixed_wing_auto_arm) {
// Auto arm on throttle when using fixedwing and motorstop
if (throttleStatus != THROTTLE_LOW) {
tryArm();
return;
}
}
else {
if (armingSwitchIsActive) {
rcDisarmTimeMs = currentTimeMs;
tryArm();
@ -205,6 +215,7 @@ void processRcStickPositions(throttleStatus_e throttleStatus)
if (IS_RC_MODE_ACTIVE(BOXKILLSWITCH)) {
disarm(DISARM_KILLSWITCH);
}
}
if (rcDelayCommand != 20) {
return;