From cfb389b6b56f7e7c2697e770059762b40285a7a4 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Tue, 3 Oct 2017 15:08:31 -0400 Subject: [PATCH] A3XX: Fix and simplify trays --- A320-main.xml | 5 ++- Models/FlightDeck/a320.flightdeck.xml | 50 +++++++-------------------- Nasal/libraries.nas | 19 +++++++++- revision.txt | 2 +- 4 files changed, 35 insertions(+), 41 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index be929f7a..5950b710 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -586,6 +586,10 @@ 0 0.5 + + 0 + 0 + @@ -1183,7 +1187,6 @@ Aircraft/IDG-A32X/Nasal/engines.nas Aircraft/IDG-A32X/Nasal/ADIRS.nas Aircraft/IDG-A32X/Nasal/fire.nas - Aircraft/IDG-A32X/Nasal/trays.nas Aircraft/IDG-A32X/Nasal/fadec-common.nas diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index ff6f2c95..ff70b42d 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -5399,7 +5399,7 @@ translate tray cylinder01 - /controls/tray/lefttrayext + controls/tray/lefttrayext 0 0 0.50.160 @@ -5416,7 +5416,7 @@ translate tray.001 cylinder01.001 - /controls/tray/righttrayext + controls/tray/righttrayext 0 0 0.50.160 @@ -5433,7 +5433,7 @@ translate tray cylinder01 - /controls/tray/lefttrayext + controls/tray/lefttrayext 0 0 0.50.045 @@ -5450,7 +5450,7 @@ translate tray.001 cylinder01.001 - /controls/tray/righttrayext + controls/tray/righttrayext 0 0 0.50.045 @@ -5466,7 +5466,7 @@ rotate tray - /controls/tray/lefttrayext + controls/tray/lefttrayext 0 0 0.40 @@ -5488,7 +5488,7 @@ rotate cylinder01.002 - /controls/tray/lefttrayext + controls/tray/lefttrayext 0 0 0.40 @@ -5510,7 +5510,7 @@ rotate tray.001 - /controls/tray/righttrayext + controls/tray/righttrayext 0 0 0.40 @@ -5532,7 +5532,7 @@ rotate cylinder01.001 - /controls/tray/righttrayext + controls/tray/righttrayext 0 0 0.40 @@ -5558,21 +5558,8 @@ - property-cycle - /controls/tray/cmdL - 0 - 0.5 - 1 - - - - - - property-cycle - /controls/tray/cmdL - 1 - 0.5 - 0 + nasal + @@ -5584,21 +5571,8 @@ - property-cycle - /controls/tray/cmdR - 0 - 0.5 - 1 - - - - - - property-cycle - /controls/tray/cmdR - 1 - 0.5 - 0 + nasal + diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index 9fd8cdac..5226569d 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -203,7 +203,6 @@ setlistener("/sim/signals/fdm-initialized", func { systems.fuel_init(); systems.fire_init(); systems.eng_init(); - systems.tray_init(); fmgc.APinit(); librariesLoop.start(); fmgc.FMGCinit(); @@ -429,4 +428,22 @@ var noseLoop = maketimer(0.1, func { } }); +var lTray = func { + var lTrayCMD = getprop("/controls/tray/lefttrayext"); + if (lTrayCMD < 1) { + interpolate("/controls/tray/lefttrayext", 1, 1); + } else { + interpolate("/controls/tray/lefttrayext", 0, 1); + } +} + +var rTray = func { + var rTrayCMD = getprop("/controls/tray/righttrayext"); + if (rTrayCMD < 1) { + interpolate("/controls/tray/righttrayext", 1, 1); + } else { + interpolate("/controls/tray/righttrayext", 0, 1); + } +} + setprop("/systems/acconfig/libraries-loaded", 1); diff --git a/revision.txt b/revision.txt index 97f6d7eb..e03b10ae 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -2017 \ No newline at end of file +2018 \ No newline at end of file