From b42759704fafd287623e3f78542823459ae3de37 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 27 Dec 2020 13:59:30 +0000 Subject: [PATCH] KAP-140: The ALT-ARM knob should only be arming the altitude interception when the AP is activated. When rotating the AP alt-selector knob with disabled AP, just the altitude alarm beep is configured. From Benedikt Hallinger Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2489/ --- Aircraft/Generic/kap140.nas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Aircraft/Generic/kap140.nas b/Aircraft/Generic/kap140.nas index 4cfcfeed1..bd67de3eb 100644 --- a/Aircraft/Generic/kap140.nas +++ b/Aircraft/Generic/kap140.nas @@ -1327,6 +1327,12 @@ var armButton = func { #print("arm button"); # Disable button if too little power if (getprop(power) < minVoltageLimit) { return; } + + # Do nothing if the AP is not turned on + if (lockPitchMode.getValue() == pitchModes["OFF"]) { + lockPitchMode.setIntValue(pitchArmModes["OFF"]); + return; + } var pitchArm = lockPitchArm.getValue();