diff --git a/AircraftConfig/main.xml b/AircraftConfig/main.xml index 932e663d..3b6d62fd 100644 --- a/AircraftConfig/main.xml +++ b/AircraftConfig/main.xml @@ -198,7 +198,7 @@ - + + + + left + /controls/pneumatic/switches/groundair + + property-toggle + /controls/pneumatic/switches/groundair + + + + + /controls/gear/brake-parking + 1 + + + /velocities/groundspeed-kt + 2 + + + + + dialog-apply + + true @@ -220,6 +245,18 @@ /controls/electrical/switches/gen-ext 0 + + + + /controls/gear/brake-parking + 1 + + + /velocities/groundspeed-kt + 2 + + + dialog-apply diff --git a/Models/Liveries/A321/WTF.png b/Models/Liveries/A321/WTF.png new file mode 100644 index 00000000..669add25 Binary files /dev/null and b/Models/Liveries/A321/WTF.png differ diff --git a/Models/Liveries/A321/WTF.xml b/Models/Liveries/A321/WTF.xml new file mode 100644 index 00000000..ba3dea0a --- /dev/null +++ b/Models/Liveries/A321/WTF.xml @@ -0,0 +1,13 @@ + + + + + + + it0uchpods VIP aircraft + Liveries/A321/WTF.png + + + + + diff --git a/Nasal/pneumatics.nas b/Nasal/pneumatics.nas index 500b7f4f..0c594473 100644 --- a/Nasal/pneumatics.nas +++ b/Nasal/pneumatics.nas @@ -1,5 +1,5 @@ # A320 Pneumatics System -# Joshua Davidson (it0uchpods) +# Joshua Davidson (it0uchpods) and Jonathan Redpath (legoboyvdlp) ############# # Init Vars # @@ -9,6 +9,7 @@ var pneu_init = func { setprop("/controls/pneumatic/switches/bleed1", 0); setprop("/controls/pneumatic/switches/bleed2", 0); setprop("/controls/pneumatic/switches/bleedapu", 0); + setprop("/controls/pneumatic/switches/groundair", 0); setprop("/controls/pneumatic/switches/pack1", 0); setprop("/controls/pneumatic/switches/pack2", 0); setprop("/controls/pneumatic/switches/hot-air", 0); @@ -18,6 +19,7 @@ var pneu_init = func { setprop("/systems/pneumatic/bleed1", 0); setprop("/systems/pneumatic/bleed2", 0); setprop("/systems/pneumatic/bleedapu", 0); + setprop("/systems/pneumatic/groundair", 0); setprop("/systems/pneumatic/total-psi", 0); setprop("/systems/pneumatic/start-psi", 0); setprop("/systems/pneumatic/pack-psi", 0); @@ -45,6 +47,8 @@ var master_pneu = func { var xbleed_sw = getprop("/controls/pneumatic/switches/xbleed"); var eng1_starter = getprop("/systems/pneumatic/eng1-starter"); var eng2_starter = getprop("/systems/pneumatic/eng2-starter"); + var groundair = getprop("/systems/pneumatic/groundair"); + var groundair_supp = getprop("/controls/pneumatic/switches/groundair"); var rpmapu = getprop("/systems/apu/rpm"); var stateL = getprop("/engines/engine[0]/state"); var stateR = getprop("/engines/engine[1]/state"); @@ -71,6 +75,7 @@ var master_pneu = func { var bleed1 = getprop("/systems/pneumatic/bleed1"); var bleed2 = getprop("/systems/pneumatic/bleed2"); var bleedapu = getprop("/systems/pneumatic/bleedapu"); + var ground = getprop("/systems/pneumatic/groundair"); if (stateL == 1 or stateR == 1) { setprop("/systems/pneumatic/start-psi", 18); @@ -78,13 +83,13 @@ var master_pneu = func { setprop("/systems/pneumatic/start-psi", 0); } - if (pack1_sw == 1 and (bleed1 >= 20 or bleedapu >= 20) and eng1_starter == 0 and eng2_starter == 0) { + if (pack1_sw == 1 and (bleed1 >= 20 or bleedapu >= 20 or ground >= 20) and eng1_starter == 0 and eng2_starter == 0) { setprop("/systems/pneumatic/pack1", pack_flo_sw); } else { setprop("/systems/pneumatic/pack1", 0); } - if (pack2_sw == 1 and (bleed2 >= 20 or bleedapu >= 20) and eng1_starter == 0 and eng2_starter == 0) { + if (pack2_sw == 1 and (bleed2 >= 20 or bleedapu >= 20 or ground >= 20) and eng1_starter == 0 and eng2_starter == 0) { setprop("/systems/pneumatic/pack2", pack_flo_sw); } else { setprop("/systems/pneumatic/pack2", 0); @@ -111,6 +116,12 @@ var master_pneu = func { setprop("/systems/pneumatic/total-psi", total_psi_calc); } + if (groundair_supp) { + setprop("/systems/pneumatic/groundair", 39); + } else { + setprop("/systems/pneumatic/groundair", 0); + } + var total_psi = getprop("/systems/pneumatic/total-psi"); } diff --git a/Nasal/various.nas b/Nasal/various.nas index eed29668..b428dbc9 100644 --- a/Nasal/various.nas +++ b/Nasal/various.nas @@ -131,6 +131,7 @@ setlistener("/sim/signals/fdm-initialized", func { systems.pneu_init(); systems.hyd_init(); itaf.ap_init(); + externalconnections.start(); var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml"); setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd2", 1); @@ -147,3 +148,14 @@ var aglgears = func { } aglgears(); + +var externalconnections = maketimer(0.1, func { + var groundpwr = getprop("/controls/switches/cart"); + var groundair = getprop("/controls/pneumatic/switches/groundair"); + var gs = getprop("/velocities/groundspeed-kt"); + var parkbrake = getprop("controls/gear/brake-parking"); + if ((groundair or groundpwr) and ((gs > 2) or !parkbrake)) { + setprop("/controls/switches/cart", 0); + setprop("/controls/pneumatic/switches/groundair", 0); + } +}); \ No newline at end of file