1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Make disarming via AUX switch independent of throttle value configurable

Conflicts:
	src/cli.c
	src/config.c
	src/mw.c
	src/mw.h
This commit is contained in:
Andreas Tacke 2014-09-01 12:09:46 +02:00 committed by Dominic Clifton
parent b4620235dd
commit 275089eca1
6 changed files with 13 additions and 6 deletions

View file

@ -67,7 +67,7 @@ throttleStatus_e calculateThrottleStatus(rxConfig_t *rxConfig, uint16_t deadband
return THROTTLE_HIGH;
}
void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStatus, uint32_t *activate, bool retarded_arm)
void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStatus, uint32_t *activate, bool retarded_arm, bool disarm_kill_switch)
{
static uint8_t rcDelayCommand; // this indicates the number of time (multiple of RC measurement at 50Hz) the sticks must be maintained to run or switch off motors
static uint8_t rcSticks; // this hold sticks position for command combos
@ -103,7 +103,11 @@ void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStat
} else {
// Disarming via ARM BOX
if (ARMING_FLAG(ARMED)) {
mwDisarm();
if (disarm_kill_switch) {
mwDisarm();
} else if (throttleStatus == THROTTLE_LOW) {
mwDisarm();
}
}
}
}