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

Changed arming procedure for fixedwing.

With Fixedwing and motorstop enable it auto arms as soon as throttle as above throttle_low.
Also disarming is disabled. (Must cycle power for it to disarm)

Without motorstop there is normal disarm/arming procedure.
This commit is contained in:
oleost 2016-07-17 20:42:10 +02:00 committed by Konstantin (DigitalEntity) Sharlaimov
parent 0c46695168
commit fc7f4d5179

View file

@ -195,17 +195,23 @@ void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStat
return;
}
if (isUsingSticksToArm) {
if (isUsingSticksToArm) {
// Disarm on throttle down + yaw
if (rcSticks == THR_LO + YAW_LO + PIT_CE + ROL_CE) {
// Dont disarm if fixedwing and motorstop
if (STATE(FIXED_WING) && feature(FEATURE_MOTOR_STOP)) {
return;
}
else {
if (ARMING_FLAG(ARMED))
mwDisarm();
else {
beeper(BEEPER_DISARM_REPEAT); // sound tone while stick held
rcDelayCommand = 0; // reset so disarm tone will repeat
}
}
}
}
}
if (ARMING_FLAG(ARMED)) {
// actions during armed
@ -246,6 +252,16 @@ void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStat
}
}
// Auto arm on throttle when using fixedwing and motorstop
if (isUsingSticksToArm) {
if ((!throttleStatus == THROTTLE_LOW) && (STATE(FIXED_WING)) && (feature(FEATURE_MOTOR_STOP))) {
// Arm via YAW
mwArm();
return;
}
}
if (rcSticks == THR_HI + YAW_LO + PIT_LO + ROL_CE) {
// Calibrating Acc
accSetCalibrationCycles(CALIBRATING_ACC_CYCLES);