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:
parent
6821ada395
commit
0246dd7c31
1 changed files with 32 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue