From b453e2e3a332d41516a210cc190a25a161a3665d Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 16 May 2020 21:04:03 +0100 Subject: [PATCH] Nasal - correct namespace definitions --- A320-main.xml | 37 +++++++++++++++------------ Models/FlightDeck/a320.flightdeck.xml | 36 ++++++++++++-------------- Nasal/ECAM/ECAM-controller.nas | 4 +-- Nasal/ECAM/ECAM-logic.nas | 4 +-- Nasal/FMGC/FCU.nas | 6 ++--- Nasal/FMGC/FMGC.nas | 2 +- Nasal/Libraries/libraries.nas | 10 ++++---- 7 files changed, 49 insertions(+), 50 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 03e26a22..e757369c 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -3950,8 +3950,6 @@ Aircraft/A320-family/Nasal/Libraries/property-tree-setup.nas - Aircraft/A320-family/Nasal/ECAM/ECAM-main.nas - Aircraft/A320-family/Nasal/Effects/light-manager.nas Aircraft/A320-family/Nasal/Libraries/libraries.nas Aircraft/A320-family/Nasal/Libraries/buttons.nas Aircraft/A320-family/Nasal/Libraries/shake.nas @@ -3963,8 +3961,6 @@ Aircraft/A320-family/Nasal/Systems/APU.nas - Aircraft/A320-family/Nasal/Effects/effects.nas - Aircraft/A320-family/Nasal/Effects/thunder-effects.nas Aircraft/A320-family/Nasal/Systems/electrical.nas Aircraft/A320-family/Nasal/Systems/pneumatics.nas Aircraft/A320-family/Nasal/Systems/hydraulics.nas @@ -3973,14 +3969,27 @@ Aircraft/A320-family/Nasal/Systems/ADIRS/ADR.nas Aircraft/A320-family/Nasal/Systems/ADIRS/SwitchingPanel.nas Aircraft/A320-family/Nasal/Systems/Comm/HF.nas - Aircraft/A320-family/Nasal/Systems/fire.nas Aircraft/A320-family/Nasal/Systems/brakes.nas Aircraft/A320-family/Nasal/Systems/brakesystem.nas - Aircraft/A320-family/Nasal/Systems/tyresmoke.nas - Aircraft/A320-family/Nasal/Systems/ground_services.nas - Aircraft/A320-family/Nasal/Systems/payload.nas Aircraft/A320-family/Nasal/Instruments/clock.nas + Aircraft/A320-family/Nasal/Systems/fire.nas + Aircraft/A320-family/Nasal/Systems/ground_services.nas + Aircraft/A320-family/Nasal/Systems/icing.nas + Aircraft/A320-family/Nasal/Systems/payload.nas + Aircraft/A320-family/Nasal/Systems/tyresmoke.nas + + Aircraft/A320-family/Nasal/ECAM/ECAM-main.nas + Aircraft/A320-family/Nasal/ECAM/ECAM-controller.nas + Aircraft/A320-family/Nasal/ECAM/ECAM-logic.nas + Aircraft/A320-family/Nasal/ECAM/ECAM-messages.nas + Aircraft/A320-family/Nasal/ECAM/ECAM-phases.nas + + + Aircraft/A320-family/Nasal/Effects/light-manager.nas + Aircraft/A320-family/Nasal/Effects/effects.nas + Aircraft/A320-family/Nasal/Effects/thunder-effects.nas + Aircraft/A320-family/Nasal/Systems/FADEC/fadec-common.nas @@ -4027,6 +4036,7 @@ Aircraft/A320-family/Nasal/MCDU/DATA.nas Aircraft/A320-family/Nasal/MCDU/STATUS.nas + Aircraft/A320-family/Models/Instruments/PFD/PFD.nas @@ -4043,15 +4053,7 @@ Aircraft/A320-family/Models/Instruments/MCDU/MCDU.nas - - Aircraft/A320-family/Nasal/ECAM/ECAM-controller.nas - Aircraft/A320-family/Nasal/ECAM/ECAM-logic.nas - Aircraft/A320-family/Nasal/ECAM/ECAM-messages.nas - Aircraft/A320-family/Nasal/ECAM/ECAM-phases.nas - - - Aircraft/A320-family/Nasal/Systems/icing.nas - + Aircraft/A320-family/Nasal/Autopush/autopush.nas @@ -4064,6 +4066,7 @@ Aircraft/A320-family/Nasal/Autopush/autopush_route.nas + Aircraft/A320-family/Nasal/Panels/rmp.nas diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index f80e0583..3514b9bb 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -2023,7 +2023,7 @@ nasal - + @@ -2042,7 +2042,7 @@ nasal - + @@ -2061,7 +2061,7 @@ nasal - + @@ -2080,7 +2080,7 @@ nasal - + @@ -2099,7 +2099,7 @@ nasal - + @@ -2118,7 +2118,7 @@ nasal - + @@ -2137,7 +2137,7 @@ nasal - + @@ -2156,7 +2156,7 @@ nasal - + @@ -2175,7 +2175,7 @@ nasal - + @@ -2194,7 +2194,7 @@ nasal - + @@ -2213,7 +2213,7 @@ nasal - + @@ -2232,7 +2232,7 @@ nasal - + @@ -2502,16 +2502,14 @@ nasal nasal - + @@ -2533,16 +2531,14 @@ nasal nasal - + diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index 87affa9a..40d2c25e 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -104,7 +104,7 @@ var warning = { }, callPage: func() { if (me.sdPage == "nil" or me.hasCalled == 1) { return; } - libraries.SystemDisplay.failCall(me.sdPage); + ecam.SystemDisplay.failCall(me.sdPage); me.hasCalled = 1; } }; @@ -336,7 +336,7 @@ var ECAM_controller = { } if (statusFlag == 1 and lines[0].getValue() == "") { - libraries.SystemDisplay.manCall("sts"); + ecam.SystemDisplay.manCall("sts"); statusFlag = 0; } }, diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index e1e6cd08..bc2419a6 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -1600,13 +1600,13 @@ var messages_right_memo = func { land_asap_a.active = 0; } - if (libraries.ap_active == 1 and apWarn.getValue() == 1) { + if (ecam.ap_active == 1 and apWarn.getValue() == 1) { ap_off.active = 1; } else { ap_off.active = 0; } - if (libraries.athr_active == 1 and athrWarn.getValue() == 1) { + if (ecam.athr_active == 1 and athrWarn.getValue() == 1) { athr_off.active = 1; } else { athr_off.active = 0; diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index b20c65b8..618893bc 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -102,7 +102,7 @@ var FCUController = { if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) { if (!ap1.getBoolValue()) { ap1Input.setValue(1); - libraries.apWarnNode.setValue(0); + ecam.apWarnNode.setValue(0); } else { apOff("hard", 1); } @@ -489,7 +489,7 @@ var updateActiveFMGC = func { # Autopilot Disconnection var apOff = func(type, side) { if ((ap1Input.getValue() and (side == 1 or side == 0)) or (ap2Input.getValue() and (side == 2 or side == 0))) { - libraries.doApWarn(type); + ecam.doApWarn(type); } if (side == 0) { @@ -509,7 +509,7 @@ var athrOff = func(type) { fadec.lockThr(); } athrInput.setValue(0); - libraries.doAthrWarn(type); + ecam.doAthrWarn(type); } } diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 20685267..88c35c04 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -788,7 +788,7 @@ var ManagedSPD = maketimer(0.25, func { } } else { ManagedSPD.stop(); - libraries.mcpSPDKnbPull(); + fcu.FCUController.SPDPull(); } }); diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index 16a9fc2f..fb6c7614 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -195,7 +195,7 @@ var triggerDoor = func(door, doorName, doorDesc) { var systemsInit = func { fbw.FBW.init(); - light_manager.init(); + effects.light_manager.init(); systems.ELEC.init(); systems.PNEU.init(); systems.HYD.init(); @@ -203,8 +203,9 @@ var systemsInit = func { systems.ADIRS.init(); systems.eng_init(); systems.APUController.init(); - systems.fire_init(); systems.autobrake_init(); + systems.fire_init(); + systems.icingInit(); fmgc.flightPlanController.reset(); fadec.FADEC.init(); fmgc.ITAF.init(); @@ -212,9 +213,8 @@ var systemsInit = func { mcdu.MCDU_init(0); mcdu.MCDU_init(1); systemsLoop.start(); - icing.icingInit(); lightsLoop.start(); - libraries.ECAM.init(); + ecam.ECAM.init(); libraries.variousReset(); rmp.init(); acp.init(); @@ -235,7 +235,7 @@ var systemsLoop = maketimer(0.1, func { systems.HYD.loop(); systems.FUEL.loop(); systems.ADIRS.loop(); - libraries.ECAM.loop(); + ecam.ECAM.loop(); libraries.BUTTONS.update(); fadec.FADEC.loop(); rmp.rmpUpdate();