From 339f8cdca5fdf6f8ce5996b3ada1fe31a3a5af76 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 9 Apr 2017 12:46:30 -0400 Subject: [PATCH] fix throttle animation, make EPR doughnuts blue --- Models/FlightDeck/a320.flightdeck.xml | 12 ++++----- .../Instruments/Upper-ECAM/resIAE/eicasIAE.ac | 2 +- Nasal/it-fbw.nas | 26 +++++++++++++------ 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index e9b3f952..c2aba87c 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -2074,10 +2074,10 @@ rotate thr_l - + /controls/engines/engine[0]/reverser - 0 - + 1 + controls/engines/engine[0]/throttle-pos @@ -2163,10 +2163,10 @@ rotate thr_r - + /controls/engines/engine[0]/reverser - 0 - + 1 + controls/engines/engine[1]/throttle-pos diff --git a/Models/Instruments/Upper-ECAM/resIAE/eicasIAE.ac b/Models/Instruments/Upper-ECAM/resIAE/eicasIAE.ac index ad424c97..5de0e6cc 100644 --- a/Models/Instruments/Upper-ECAM/resIAE/eicasIAE.ac +++ b/Models/Instruments/Upper-ECAM/resIAE/eicasIAE.ac @@ -1,7 +1,7 @@ AC3Db MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 1 1 1 spec 0 0 0 shi 128 trans 0 MATERIAL "DefaultWhite.001" rgb 0 0 0 amb 0 0 0 emis 0 0 0 spec 0 0 0 shi 64 trans 0 -MATERIAL "ac3dmat9" rgb 0 0.4 0.8 amb 0 0.4 0.8 emis 1 1 1 spec 0 0 0 shi 0 trans 0 +MATERIAL "ac3dmat9" rgb 0 0.356863 0.717647 amb 0 0 0 emis 0 0.356863 0.717647 spec 0 0 0 shi 0 trans 0 OBJECT world kids 17 OBJECT poly diff --git a/Nasal/it-fbw.nas b/Nasal/it-fbw.nas index 9ed7772d..7446663d 100644 --- a/Nasal/it-fbw.nas +++ b/Nasal/it-fbw.nas @@ -1,5 +1,9 @@ -# A320 FBW System by Joshua Davidson (it0uchpods/411) -# V0.9 +# Airbus A3XX FBW System by Joshua Davidson (it0uchpods/411) +# V0.9.1 + +######################## +# Roll Update Function # +######################## var roll_input = func { @@ -68,10 +72,12 @@ var roll_input = func { if (getprop("/gear/gear[0]/wow") == 1) { setprop("/it-fbw/roll-deg", "0"); } - - settimer(roll_input, 0.01); } +######################### +# Pitch Update Function # +######################### + var pitch_input = func { var elev = getprop("/controls/flight/elevator"); @@ -154,8 +160,6 @@ var pitch_input = func { setprop("/it-fbw/pitch-deg", getprop("/orientation/pitch-deg")); } } - - settimer(pitch_input, 0.01); } setlistener("/it-autoflight/output/ap1", func { @@ -184,8 +188,8 @@ setlistener("/it-fbw/law", func { setlistener("/sim/signals/fdm-initialized", func { setprop("/it-fbw/law", "DIRECT"); - roll_input(); - pitch_input(); + update_roll.start(); + update_pitch.start(); print("AIRBUS FBW ... OK!"); }); @@ -200,3 +204,9 @@ setlistener("/systems/electrical/bus/ac-ess", func { } } }); + +########## +# Timers # +########## +var update_roll = maketimer(0.01, roll_input); +var update_pitch = maketimer(0.01, pitch_input);