From 4b4410becfbe3a11a6662fda73dac6fcf8cc6409 Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Wed, 26 May 2021 10:18:40 +0100 Subject: [PATCH] Allow control of whether 'b' key also cancels parking brake. Uses new property /sim/controls/brake-cancels-parking-brake. Default is true; it is expected that some aircraft (e.g. p51d) will set this to false so they can implement their own brake/parking-brake interaction. Should address bug 2589. --- Nasal/controls.nas | 4 +++- defaults.xml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Nasal/controls.nas b/Nasal/controls.nas index 9e982e3ab..9d8317251 100644 --- a/Nasal/controls.nas +++ b/Nasal/controls.nas @@ -489,7 +489,9 @@ var fullBrakeTime = 0.5; var applyBrakes = func(v, which = 0) { if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); } if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); } - setprop("/controls/gear/brake-parking", 0); + if (v and props.globals.getNode("/sim/controls/brake-cancels-parking-brake", 1).getBoolValue()) { + setprop("/controls/gear/brake-parking", 0); + } } var applyPickle = func(v) { setprop("/controls/armament/pickle", v); diff --git a/defaults.xml b/defaults.xml index d11c63c7d..ff7a0fcc1 100644 --- a/defaults.xml +++ b/defaults.xml @@ -35,6 +35,9 @@ Started September 2000 by David Megginson, david@megginson.com true + + true + 1024 768