mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
LP-309 skip edge detection if not transitioning from fully ARMED/DISARMED state
This commit is contained in:
parent
633d8d4969
commit
5205d95a8c
@ -203,6 +203,11 @@ void armHandler(bool newinit, FrameType_t frameType)
|
||||
previousArmingInputLevel = 0.0f;
|
||||
}
|
||||
|
||||
// ignore previous arming input level if not transitioning from fully ARMED/DISARMED states.
|
||||
if((armState != ARM_STATE_DISARMED) && (armState != ARM_STATE_ARMED)) {
|
||||
previousArmingInputLevel = 0.0f;
|
||||
}
|
||||
|
||||
if ((armingInputLevel <= -ARMED_THRESHOLD) && (previousArmingInputLevel > -ARMED_THRESHOLD)) {
|
||||
manualArm = true;
|
||||
} else if ((armingInputLevel >= +ARMED_THRESHOLD) && (previousArmingInputLevel < +ARMED_THRESHOLD)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user