1
0
Fork 0

DMC: fix potential bug-cause

This commit is contained in:
legoboyvdlp R 2020-07-11 20:56:08 +01:00
parent b8c255a2cd
commit 6b3e344807
2 changed files with 8 additions and 18 deletions

View file

@ -4150,7 +4150,6 @@
<effects>
<file>Aircraft/A320-family/Nasal/Effects/light-manager.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/thunder-effects.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/effects.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/icing.nas</file>
</effects>
<systems>
@ -4178,11 +4177,6 @@
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-messages.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-phases.nas</file>
</ecam>
<effects>
<file>Aircraft/A320-family/Nasal/Effects/light-manager.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/effects.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/thunder-effects.nas</file>
</effects>
<fadec>
<file>Aircraft/A320-family/Nasal/Systems/FADEC/fadec-common.nas</file>
</fadec>

View file

@ -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) {