From 6b3e344807d906129b30af0308fd2862b8573cd3 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 11 Jul 2020 20:56:08 +0100 Subject: [PATCH] DMC: fix potential bug-cause --- A320-main.xml | 6 ------ Nasal/Displays/DMC.nas | 20 ++++++++------------ 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 51ce2f72..8b56dde5 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -4150,7 +4150,6 @@ Aircraft/A320-family/Nasal/Effects/light-manager.nas Aircraft/A320-family/Nasal/Effects/thunder-effects.nas - Aircraft/A320-family/Nasal/Effects/effects.nas Aircraft/A320-family/Nasal/Effects/icing.nas @@ -4178,11 +4177,6 @@ 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 diff --git a/Nasal/Displays/DMC.nas b/Nasal/Displays/DMC.nas index b0f6c412..4963deb6 100644 --- a/Nasal/Displays/DMC.nas +++ b/Nasal/Displays/DMC.nas @@ -7,21 +7,17 @@ var DMC = { _set: 0, _setNil: 0, - activeADIRS: -9, - - airspeeds: [props.globals.getNode("systems/navigation/adr/output/cas-1", 1), props.globals.getNode("systems/navigation/adr/output/cas-2", 1), props.globals.getNode("systems/navigation/adr/output/cas-3", 1)], - altitudes: [props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)], - machs: [props.globals.getNode("systems/navigation/adr/output/mach-1", 1), props.globals.getNode("systems/navigation/adr/output/mach-2", 1), props.globals.getNode("systems/navigation/adr/output/mach-3", 1)], - altitudesPfd: [props.globals.getNode("instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)], - sats: [props.globals.getNode("systems/navigation/adr/output/sat-1", 1), props.globals.getNode("systems/navigation/adr/output/sat-2", 1), props.globals.getNode("systems/navigation/adr/output/sat-3", 1)], - tats: [props.globals.getNode("systems/navigation/adr/output/tat-1", 1), props.globals.getNode("systems/navigation/adr/output/tat-2", 1), props.globals.getNode("systems/navigation/adr/output/tat-3", 1)], - trends: [props.globals.getNode("instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-3", 1)], - outputs: [nil, nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend - new: func(num) { var d = { parents:[DMC] }; d.activeADIRS = num; - d.outputs = [nil, nil, nil, nil, nil, nil, nil]; + d.airspeeds = [props.globals.getNode("systems/navigation/adr/output/cas-1", 1), props.globals.getNode("systems/navigation/adr/output/cas-2", 1), props.globals.getNode("systems/navigation/adr/output/cas-3", 1)]; + d.altitudes = [props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)]; + d.machs = [props.globals.getNode("systems/navigation/adr/output/mach-1", 1), props.globals.getNode("systems/navigation/adr/output/mach-2", 1), props.globals.getNode("systems/navigation/adr/output/mach-3", 1)]; + d.altitudesPfd = [props.globals.getNode("instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)]; + d.sats = [props.globals.getNode("systems/navigation/adr/output/sat-1", 1), props.globals.getNode("systems/navigation/adr/output/sat-2", 1), props.globals.getNode("systems/navigation/adr/output/sat-3", 1)]; + d.tats = [props.globals.getNode("systems/navigation/adr/output/tat-1", 1), props.globals.getNode("systems/navigation/adr/output/tat-2", 1), props.globals.getNode("systems/navigation/adr/output/tat-3", 1)]; + d.trends = [props.globals.getNode("instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-3", 1)]; + d.outputs = [nil, nil, nil, nil, nil, nil, nil]; # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend return d; }, changeActiveADIRS: func(newADIRS) {