Fixed all problems cause by move to props.nas

Signed-off-by: merspieler <merspieler@airmail.cc>
This commit is contained in:
merspieler 2018-09-24 12:41:09 +02:00
parent 18ca7631c6
commit 7bed492937

View file

@ -72,185 +72,185 @@ var du4_test_time = props.globals.initNode("/instrumentation/du/du4-test-time",
var du4_test_amount = props.globals.initNode("/instrumentation/du/du4-test-amount", 0); var du4_test_amount = props.globals.initNode("/instrumentation/du/du4-test-amount", 0);
# Fetch Nodes # Fetch Nodes
var elapsed_sec = props.global.getNode("/sim/time/elapsed-sec"); var elapsed_sec = props.globals.getNode("/sim/time/elapsed-sec", 1);
var ac2 = props.global.getNode("/systems/electrical/bus/ac2"); var ac2 = props.globals.getNode("/systems/electrical/bus/ac2", 1);
var autoconfig_running = props.global.getNode("/systems/acconfig/autoconfig-running"); var autoconfig_running = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
var ac1_src = props.global.getNode("/systems/electrical/ac1-src"); var ac1_src = props.globals.getNode("/systems/electrical/ac1-src", 1);
var ac2_src = props.global.getNode("/systems/electrical/ac2-src"); var ac2_src = props.globals.getNode("/systems/electrical/ac2-src", 1);
var lighting_du4 = props.global.getNode("/controls/lighting/DU/du4"); var lighting_du4 = props.globals.getNode("/controls/lighting/DU/du4", 1);
var ecam_page = props.global.getNode("/ECAM/Lower/page"); var ecam_page = props.globals.getNode("/ECAM/Lower/page", 1);
var hour = props.global.getNode("/sim/time/utc/hour"); var hour = props.globals.getNode("/sim/time/utc/hour", 1);
var minute = props.global.getNode("/sim/time/utc/minute"); var minute = props.globals.getNode("/sim/time/utc/minute", 1);
var apu_flap = props.global.getNode("/systems/apu/flap"); var apu_flap = props.globals.getNode("/systems/apu/flap", 1);
var apu_rpm = props.global.getNode("/systems/apu/rpm"); var apu_rpm = props.globals.getNode("/systems/apu/rpm", 1);
var tank3_content_lbs = props.global.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"); var tank3_content_lbs = props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1);
var apu_master = props.global.getNode("/controls/APU/master"); var apu_master = props.globals.getNode("/controls/APU/master", 1);
var gen_apu = props.global.getNode("/controls/electrical/switches/gen-apu"); var gen_apu = props.globals.getNode("/controls/electrical/switches/gen-apu", 1);
var ir2_knob = props.global.getNode("/controls/adirs/ir[1]/knob"); var ir2_knob = props.globals.getNode("/controls/adirs/ir[1]/knob", 1);
var switch_bleedapu = props.global.getNode("/controls/pneumatic/switches/bleedapu"); var switch_bleedapu = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1);
var pneumatic_xbleed_state = props.global.getNode("/systems/pneumatic/xbleed-state"); var pneumatic_xbleed_state = props.globals.getNode("/systems/pneumatic/xbleed-state", 1);
var xbleed = props.global.getNode("/systems/pneumatic/xbleed"); var xbleed = props.globals.getNode("/systems/pneumatic/xbleed", 1);
var hp_valve1_state = props.global.getNode("/systems/pneumatic/hp-valve-1-state"); var hp_valve1_state = props.globals.getNode("/systems/pneumatic/hp-valve-1-state", 1);
var hp_valve2_state = props.global.getNode("/systems/pneumatic/hp-valve-2-state"); var hp_valve2_state = props.globals.getNode("/systems/pneumatic/hp-valve-2-state", 1);
var hp_valve1 = props.global.getNode("/systems/pneumatic/hp-valve-1"); var hp_valve1 = props.globals.getNode("/systems/pneumatic/hp-valve-1", 1);
var hp_valve2 = props.global.getNode("/systems/pneumatic/hp-valve-2"); var hp_valve2 = props.globals.getNode("/systems/pneumatic/hp-valve-2", 1);
var eng_valve1_state = props.global.getNode("/systems/pneumatic/eng-valve-1-state"); var eng_valve1_state = props.globals.getNode("/systems/pneumatic/eng-valve-1-state", 1);
var eng_valve2_state = props.global.getNode("/systems/pneumatic/eng-valve-2-state"); var eng_valve2_state = props.globals.getNode("/systems/pneumatic/eng-valve-2-state", 1);
var eng_valve1 = props.global.getNode("/systems/pneumatic/eng-valve-1"); var eng_valve1 = props.globals.getNode("/systems/pneumatic/eng-valve-1", 1);
var eng_valve2 = props.global.getNode("/systems/pneumatic/eng-valve-2"); var eng_valve2 = props.globals.getNode("/systems/pneumatic/eng-valve-2", 1);
var precooler1_psi = props.global.getNode("/systems/pneumatic/precooler-1-psi"); var precooler1_psi = props.globals.getNode("/systems/pneumatic/precooler-1-psi", 1);
var precooler2_psi = props.global.getNode("/systems/pneumatic/precooler-2-psi"); var precooler2_psi = props.globals.getNode("/systems/pneumatic/precooler-2-psi", 1);
var precooler1_temp = props.global.getNode("/systems/pneumatic/precooler-1-temp"); var precooler1_temp = props.globals.getNode("/systems/pneumatic/precooler-1-temp", 1);
var precooler2_temp = props.global.getNode("/systems/pneumatic/precooler-2-temp"); var precooler2_temp = props.globals.getNode("/systems/pneumatic/precooler-2-temp", 1);
var precooler1_ovht = props.global.getNode("/systems/pneumatic/precooler-1-ovht"); var precooler1_ovht = props.globals.getNode("/systems/pneumatic/precooler-1-ovht", 1);
var precooler2_ovht = props.global.getNode("/systems/pneumatic/precooler-2-ovht"); var precooler2_ovht = props.globals.getNode("/systems/pneumatic/precooler-2-ovht", 1);
var gs_kt = props.global.getNode("/velocities/groundspeed-kt"); var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1);
var switch_wing_aice = props.global.getNode("/controls/switches/wing"); var switch_wing_aice = props.globals.getNode("/controls/switches/wing", 1);
var deice_wing = props.global.getNode("/controls/deice/wing"); var deice_wing = props.globals.getNode("/controls/deice/wing", 1);
var eng1_n2_actual = props.global.getNode("/engines/engine[0]/n2-actual"); var eng1_n2_actual = props.globals.getNode("/engines/engine[0]/n2-actual", 1);
var eng2_n2_actual = props.global.getNode("/engines/engine[1]/n2-actual"); var eng2_n2_actual = props.globals.getNode("/engines/engine[1]/n2-actual", 1);
var pack1_out_temp = props.global.getNode("/systems/pressurization/pack-1-out-temp"); var pack1_out_temp = props.globals.getNode("/systems/pressurization/pack-1-out-temp", 1);
var pack2_out_temp = props.global.getNode("/systems/pressurization/pack-2-out-temp"); var pack2_out_temp = props.globals.getNode("/systems/pressurization/pack-2-out-temp", 1);
var pack1_comp_out_temp = props.global.getNode("/systems/pressurization/pack-1-comp-out-temp"); var pack1_comp_out_temp = props.globals.getNode("/systems/pressurization/pack-1-comp-out-temp", 1);
var pack2_comp_out_temp = props.global.getNode("/systems/pressurization/pack-2-comp-out-temp"); var pack2_comp_out_temp = props.globals.getNode("/systems/pressurization/pack-2-comp-out-temp", 1);
var pack1_bypass = props.global.getNode("/systems/pressurization/pack-1-bypass"); var pack1_bypass = props.globals.getNode("/systems/pressurization/pack-1-bypass", 1);
var pack2_bypass = props.global.getNode("/systems/pressurization/pack-2-bypass"); var pack2_bypass = props.globals.getNode("/systems/pressurization/pack-2-bypass", 1);
var pack1_flow = props.global.getNode("/systems/pressurization/pack-1-flow"); var pack1_flow = props.globals.getNode("/systems/pressurization/pack-1-flow", 1);
var pack2_flow = props.global.getNode("/systems/pressurization/pack-2-flow"); var pack2_flow = props.globals.getNode("/systems/pressurization/pack-2-flow", 1);
var pack1_valve = props.global.getNode("/systems/pressurization/pack-1-valve"); var pack1_valve = props.globals.getNode("/systems/pressurization/pack-1-valve", 1);
var pack2_valve = props.global.getNode("/systems/pressurization/pack-2-valve"); var pack2_valve = props.globals.getNode("/systems/pressurization/pack-2-valve", 1);
var switch_pack1 = props.global.getNode("/controls/pneumatic/switches/pack1"); var switch_pack1 = props.globals.getNode("/controls/pneumatic/switches/pack1", 1);
var switch_pack2 = props.global.getNode("/controls/pneumatic/switches/pack2"); var switch_pack2 = props.globals.getNode("/controls/pneumatic/switches/pack2", 1);
var oil_qt1_actual = props.global.getNode("/engines/engine[0]/oil-qt-actual"); var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1);
var oil_qt2_actual = props.global.getNode("/engines/engine[1]/oil-qt-actual"); var oil_qt2_actual = props.globals.getNode("/engines/engine[1]/oil-qt-actual", 1);
var doorL1_pos = props.global.getNode("sim/model/door-positions/doorl1/position-norm"); var doorL1_pos = props.globals.getNode("sim/model/door-positions/doorl1/position-norm", 1);
var doorR1_pos = props.global.getNode("sim/model/door-positions/doorr1/position-norm"); var doorR1_pos = props.globals.getNode("sim/model/door-positions/doorr1/position-norm", 1);
var doorL4_pos = props.global.getNode("sim/model/door-positions/doorl4/position-norm"); var doorL4_pos = props.globals.getNode("sim/model/door-positions/doorl4/position-norm", 1);
var doorR4_pos = props.global.getNode("sim/model/door-positions/doorr4/position-norm"); var doorR4_pos = props.globals.getNode("sim/model/door-positions/doorr4/position-norm", 1);
var cargobulk_pos = props.global.getNode("/sim/model/door-positions/cargobulk/position-norm"); var cargobulk_pos = props.globals.getNode("/sim/model/door-positions/cargobulk/position-norm", 1);
var cargofwd_pos = props.global.getNode("/sim/model/door-positions/cargofwd/position-norm"); var cargofwd_pos = props.globals.getNode("/sim/model/door-positions/cargofwd/position-norm", 1);
var cargoaft_pos = props.global.getNode("/sim/model/door-positions/cargoaft/position-norm"); var cargoaft_pos = props.globals.getNode("/sim/model/door-positions/cargoaft/position-norm", 1);
var switch_bat1 = props.global.getNode("/controls/electrical/switches/battery1"); var switch_bat1 = props.globals.getNode("/controls/electrical/switches/battery1", 1);
var switch_bat2 = props.global.getNode("/controls/electrical/switches/battery2"); var switch_bat2 = props.globals.getNode("/controls/electrical/switches/battery2", 1);
var bat1_amps = props.global.getNode("/systems/electrical/battery1-amps"); var bat1_amps = props.globals.getNode("/systems/electrical/battery1-amps", 1);
var bat2_amps = props.global.getNode("/systems/electrical/battery2-amps"); var bat2_amps = props.globals.getNode("/systems/electrical/battery2-amps", 1);
var bat1_volts = props.global.getNode("/systems/electrical/battery1-volts"); var bat1_volts = props.globals.getNode("/systems/electrical/battery1-volts", 1);
var bat2_volts = props.global.getNode("/systems/electrical/battery2-volts"); var bat2_volts = props.globals.getNode("/systems/electrical/battery2-volts", 1);
var bat1_fault = props.global.getNode("/systems/electrical/batt1-fault"); var bat1_fault = props.globals.getNode("/systems/electrical/batt1-fault", 1);
var bat2_fault = props.global.getNode("/systems/electrical/batt2-fault"); var bat2_fault = props.globals.getNode("/systems/electrical/batt2-fault", 1);
var tr1_volts = props.global.getNode("/systems/electrical/extra/tr1-volts"); var tr1_volts = props.globals.getNode("/systems/electrical/extra/tr1-volts", 1);
var tr2_volts = props.global.getNode("/systems/electrical/extra/tr2-volts"); var tr2_volts = props.globals.getNode("/systems/electrical/extra/tr2-volts", 1);
var tr1_amps = props.global.getNode("/systems/electrical/extra/tr1-amps"); var tr1_amps = props.globals.getNode("/systems/electrical/extra/tr1-amps", 1);
var tr2_amps = props.global.getNode("/systems/electrical/extra/tr2-amps"); var tr2_amps = props.globals.getNode("/systems/electrical/extra/tr2-amps", 1);
var dc1 = props.global.getNode("/systems/electrical/bus/dc1"); var dc1 = props.globals.getNode("/systems/electrical/bus/dc1", 1);
var dc2 = props.global.getNode("/systems/electrical/bus/dc2"); var dc2 = props.globals.getNode("/systems/electrical/bus/dc2", 1);
var dc_ess = props.global.getNode("/systems/electrical/bus/dc-ess"); var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
var switch_emer_gen = props.global.getNode("/controls/electrical/switches/emer-gen"); var switch_emer_gen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
var switch_gen1 = props.global.getNode("/controls/electrical/switches/gen1"); var switch_gen1 = props.globals.getNode("/controls/electrical/switches/gen1", 1);
var switch_gen2 = props.global.getNode("/controls/electrical/switches/gen2"); var switch_gen2 = props.globals.getNode("/controls/electrical/switches/gen2", 1);
var eng1_running = props.global.getNode("/engines/engine[0]/running"); var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1);
var eng2_running = props.global.getNode("/engines/engine[1]/running"); var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1);
var gen1_load = props.global.getNode("/systems/electrical/extra/gen1-load"); var gen1_load = props.globals.getNode("/systems/electrical/extra/gen1-load", 1);
var gen2_load = props.global.getNode("/systems/electrical/extra/gen2-load"); var gen2_load = props.globals.getNode("/systems/electrical/extra/gen2-load", 1);
var gen1_volts = props.global.getNode("/systems/electrical/extra/gen1-volts"); var gen1_volts = props.globals.getNode("/systems/electrical/extra/gen1-volts", 1);
var gen2_volts = props.global.getNode("/systems/electrical/extra/gen2-volts"); var gen2_volts = props.globals.getNode("/systems/electrical/extra/gen2-volts", 1);
var gen1_hz = props.global.getNode("/systems/electrical/bus/gen1-hz"); var gen1_hz = props.globals.getNode("/systems/electrical/bus/gen1-hz", 1);
var gen2_hz = props.global.getNode("/systems/electrical/bus/gen2-hz"); var gen2_hz = props.globals.getNode("/systems/electrical/bus/gen2-hz", 1);
var switch_cart = props.global.getNode("/controls/switches/cart"); var switch_cart = props.globals.getNode("/controls/switches/cart", 1);
var ext_volts = props.global.getNode("/systems/electrical/extra/ext-volts"); var ext_volts = props.globals.getNode("/systems/electrical/extra/ext-volts", 1);
var ext_hz = props.global.getNode("/systems/electrical/extra/ext-hz"); var ext_hz = props.globals.getNode("/systems/electrical/extra/ext-hz", 1);
var galleyshed = props.global.getNode("/systems/electrical/extra/galleyshed"); var galleyshed = props.globals.getNode("/systems/electrical/extra/galleyshed", 1);
var switch_galley = props.global.getNode("/controls/electrical/switches/galley"); var switch_galley = props.globals.getNode("/controls/electrical/switches/galley", 1);
var dcbat = props.global.getNode("/systems/electrical/bus/dcbat"); var dcbat = props.globals.getNode("/systems/electrical/bus/dcbat", 1);
var ac_ess = props.global.getNode("/systems/electrical/bus/ac-ess"); var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
var ac1 = props.global.getNode("/systems/electrical/bus/ac1"); var ac1 = props.globals.getNode("/systems/electrical/bus/ac1", 1);
var ac2 = props.global.getNode("/systems/electrical/bus/ac2"); var ac2 = props.globals.getNode("/systems/electrical/bus/ac2", 1);
var switch_ac_ess_feed = props.global.getNode("/controls/electrical/switches/ac-ess-feed"); var switch_ac_ess_feed = props.globals.getNode("/controls/electrical/switches/ac-ess-feed", 1);
var tr1_fault = props.global.getNode("/systems/electrical/tr1-fault"); var tr1_fault = props.globals.getNode("/systems/electrical/tr1-fault", 1);
var tr2_fault = props.global.getNode("/systems/electrical/tr2-fault"); var tr2_fault = props.globals.getNode("/systems/electrical/tr2-fault", 1);
var total_psi = props.global.getNode("/systems/pneumatic/total-psi"); var total_psi = props.globals.getNode("/systems/pneumatic/total-psi", 1);
var b_psi = props.global.getNode("/systems/hydraulic/blue-psi"); var b_psi = props.globals.getNode("/systems/hydraulic/blue-psi", 1);
var g_psi = props.global.getNode("/systems/hydraulic/green-psi"); var g_psi = props.globals.getNode("/systems/hydraulic/green-psi", 1);
var y_psi = props.global.getNode("/systems/hydraulic/yellow-psi"); var y_psi = props.globals.getNode("/systems/hydraulic/yellow-psi", 1);
var spoiler_L1 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-l1/final-deg"); var spoiler_L1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l1/final-deg", 1);
var spoiler_L2 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-l2/final-deg"); var spoiler_L2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l2/final-deg", 1);
var spoiler_L3 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-l3/final-deg"); var spoiler_L3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l3/final-deg", 1);
var spoiler_L4 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-l4/final-deg"); var spoiler_L4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l4/final-deg", 1);
var spoiler_L5 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-l5/final-deg"); var spoiler_L5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l5/final-deg", 1);
var spoiler_R1 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-r1/final-deg"); var spoiler_R1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r1/final-deg", 1);
var spoiler_R2 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-r2/final-deg"); var spoiler_R2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r2/final-deg", 1);
var spoiler_R3 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-r3/final-deg"); var spoiler_R3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r3/final-deg", 1);
var spoiler_R4 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-r4/final-deg"); var spoiler_R4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r4/final-deg", 1);
var spoiler_R5 = props.global.getNode("/fdm/jsbsim/hydraulics/spoiler-r5/final-deg"); var spoiler_R5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r5/final-deg", 1);
var spoiler_L1_fail = props.global.getNode("/systems/failures/spoiler-l1"); var spoiler_L1_fail = props.globals.getNode("/systems/failures/spoiler-l1", 1);
var spoiler_L2_fail = props.global.getNode("/systems/failures/spoiler-l2"); var spoiler_L2_fail = props.globals.getNode("/systems/failures/spoiler-l2", 1);
var spoiler_L3_fail = props.global.getNode("/systems/failures/spoiler-l3"); var spoiler_L3_fail = props.globals.getNode("/systems/failures/spoiler-l3", 1);
var spoiler_L4_fail = props.global.getNode("/systems/failures/spoiler-l4"); var spoiler_L4_fail = props.globals.getNode("/systems/failures/spoiler-l4", 1);
var spoiler_L5_fail = props.global.getNode("/systems/failures/spoiler-l5"); var spoiler_L5_fail = props.globals.getNode("/systems/failures/spoiler-l5", 1);
var spoiler_R1_fail = props.global.getNode("/systems/failures/spoiler-r1"); var spoiler_R1_fail = props.globals.getNode("/systems/failures/spoiler-r1", 1);
var spoiler_R2_fail = props.global.getNode("/systems/failures/spoiler-r2"); var spoiler_R2_fail = props.globals.getNode("/systems/failures/spoiler-r2", 1);
var spoiler_R3_fail = props.global.getNode("/systems/failures/spoiler-r3"); var spoiler_R3_fail = props.globals.getNode("/systems/failures/spoiler-r3", 1);
var spoiler_R4_fail = props.global.getNode("/systems/failures/spoiler-r4"); var spoiler_R4_fail = props.globals.getNode("/systems/failures/spoiler-r4", 1);
var spoiler_R5_fail = props.global.getNode("/systems/failures/spoiler-r5"); var spoiler_R5_fail = props.globals.getNode("/systems/failures/spoiler-r5", 1);
var elac1 = props.global.getNode("/systems/fctl/elac1"); var elac1 = props.globals.getNode("/systems/fctl/elac1", 1);
var elac2 = props.global.getNode("/systems/fctl/elac2"); var elac2 = props.globals.getNode("/systems/fctl/elac2", 1);
var sec1 = props.global.getNode("/systems/fctl/sec1"); var sec1 = props.globals.getNode("/systems/fctl/sec1", 1);
var sec2 = props.global.getNode("/systems/fctl/sec2"); var sec2 = props.globals.getNode("/systems/fctl/sec2", 1);
var sec3 = props.global.getNode("/systems/fctl/sec3"); var sec3 = props.globals.getNode("/systems/fctl/sec3", 1);
var elac1_fail = props.global.getNode("/systems/failures/elac1"); var elac1_fail = props.globals.getNode("/systems/failures/elac1", 1);
var elac2_fail = props.global.getNode("/systems/failures/elac2"); var elac2_fail = props.globals.getNode("/systems/failures/elac2", 1);
var sec1_fail = props.global.getNode("/systems/failures/sec1"); var sec1_fail = props.globals.getNode("/systems/failures/sec1", 1);
var sec2_fail = props.global.getNode("/systems/failures/sec2"); var sec2_fail = props.globals.getNode("/systems/failures/sec2", 1);
var sec3_fail = props.global.getNode("/systems/failures/sec3"); var sec3_fail = props.globals.getNode("/systems/failures/sec3", 1);
var eng1_n1 = props.global.getNode("engines/engine[0]/n1-actual"); var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1);
var eng2_n1 = props.global.getNode("engines/engine[1]/n1-actual"); var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1);
var total_fuel_lbs = props.global.getNode("/consumables/fuel/total-fuel-lbs"); var total_fuel_lbs = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1);
var fadec1 = props.global.getNode("/systems/fadec/powered1"); var fadec1 = props.globals.getNode("/systems/fadec/powered1", 1);
var fadec2 = props.global.getNode("/systems/fadec/powered2"); var fadec2 = props.globals.getNode("/systems/fadec/powered2", 1);
var fuel_flow1 = props.global.getNode("/engines/engine[0]/fuel-flow_actual"); var fuel_flow1 = props.globals.getNode("/engines/engine[0]/fuel-flow_actual", 1);
var fuel_flow2 = props.global.getNode("/engines/engine[1]/fuel-flow_actual"); var fuel_flow2 = props.globals.getNode("/engines/engine[1]/fuel-flow_actual", 1);
var cutoff_switch1 = props.global.getNode("/controls/engines/engine[0]/cutoff-switch"); var cutoff_switch1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff_switch2 = props.global.getNode("/controls/engines/engine[1]/cutoff-switch"); var cutoff_switch2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
var fuel_xfeed = props.global.getNode("/controls/fuel/x-feed"); var fuel_xfeed = props.globals.getNode("/controls/fuel/x-feed", 1);
var tank0pump1 = props.global.getNode("controls/fuel/tank0pump1"); var tank0pump1 = props.globals.getNode("controls/fuel/tank0pump1", 1);
var tank0pump2 = props.global.getNode("controls/fuel/tank0pump2"); var tank0pump2 = props.globals.getNode("controls/fuel/tank0pump2", 1);
var tank1pump1 = props.global.getNode("controls/fuel/tank1pump1"); var tank1pump1 = props.globals.getNode("controls/fuel/tank1pump1", 1);
var tank1pump2 = props.global.getNode("controls/fuel/tank1pump2"); var tank1pump2 = props.globals.getNode("controls/fuel/tank1pump2", 1);
var tank2pump1 = props.global.getNode("controls/fuel/tank2pump1"); var tank2pump1 = props.globals.getNode("controls/fuel/tank2pump1", 1);
var tank2pump2 = props.global.getNode("controls/fuel/tank2pump2"); var tank2pump2 = props.globals.getNode("controls/fuel/tank2pump2", 1);
var ptu = props.global.getNode("/controls/hydraulic/ptu"); var ptu = props.globals.getNode("/controls/hydraulic/ptu", 1);
var ptu_fault = props.global.getNode("/systems/hydraulic/ptu-fault"); var ptu_fault = props.globals.getNode("/systems/hydraulic/ptu-fault", 1);
var ptu_active = props.global.getNode("/systems/hydraulic/ptu-active"); var ptu_active = props.globals.getNode("/systems/hydraulic/ptu-active", 1);
var ptu_supplies = props.global.getNode("/systems/hydraulic/ptu-supplies"); var ptu_supplies = props.globals.getNode("/systems/hydraulic/ptu-supplies", 1);
var eng1_pump = props.global.getNode("/controls/hydraulic/eng1-pump"); var eng1_pump = props.globals.getNode("/controls/hydraulic/eng1-pump", 1);
var eng2_pump = props.global.getNode("/controls/hydraulic/eng2-pump"); var eng2_pump = props.globals.getNode("/controls/hydraulic/eng2-pump", 1);
var elec_pump_blue = props.global.getNode("/controls/hydraulic/elec-pump-blue"); var elec_pump_blue = props.globals.getNode("/controls/hydraulic/elec-pump-blue", 1);
var elec_pump_yellow = props.global.getNode("/controls/hydraulic/elec-pump-yellow"); var elec_pump_yellow = props.globals.getNode("/controls/hydraulic/elec-pump-yellow", 1);
var y_resv_lo_air_press = props.global.getNode("/systems/hydraulic/yellow-resv-lo-air-press"); var y_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/yellow-resv-lo-air-press", 1);
var b_resv_lo_air_press = props.global.getNode("/systems/hydraulic/blue-resv-lo-air-press"); var b_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/blue-resv-lo-air-press", 1);
var g_resv_lo_air_press = props.global.getNode("/systems/hydraulic/green-resv-lo-air-press"); var g_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/green-resv-lo-air-press", 1);
var elec_pump_y_ovht = props.global.getNode("/systems/hydraulic/elec-pump-yellow-ovht"); var elec_pump_y_ovht = props.globals.getNode("/systems/hydraulic/elec-pump-yellow-ovht", 1);
var elec_pump_b_ovht = props.global.getNode("/systems/hydraulic/elec-pump-blue-ovht"); var elec_pump_b_ovht = props.globals.getNode("/systems/hydraulic/elec-pump-blue-ovht", 1);
var rat_deployed = props.global.getNode("/controls/hydraulic/rat-deployed"); var rat_deployed = props.globals.getNode("/controls/hydraulic/rat-deployed", 1);
var y_resv_ovht = props.global.getNode("/systems/hydraulic/yellow-resv-ovht"); var y_resv_ovht = props.globals.getNode("/systems/hydraulic/yellow-resv-ovht", 1);
var b_resv_ovht = props.global.getNode("/systems/hydraulic/blue-resv-ovht"); var b_resv_ovht = props.globals.getNode("/systems/hydraulic/blue-resv-ovht", 1);
var g_resv_ovht = props.global.getNode("/systems/hydraulic/green-resv-ovht"); var g_resv_ovht = props.globals.getNode("/systems/hydraulic/green-resv-ovht", 1);
var y_fire_valve = props.global.getNode("/systems/hydraulic/yellow-fire-valve"); var y_fire_valve = props.globals.getNode("/systems/hydraulic/yellow-fire-valve", 1);
var g_fire_valve = props.global.getNode("/systems/hydraulic/green-fire-valve"); var g_fire_valve = props.globals.getNode("/systems/hydraulic/green-fire-valve", 1);
var autobreak_mode = props.global.getNode("/controls/autobrake/mode"); var autobreak_mode = props.globals.getNode("/controls/autobrake/mode", 1);
var gear1_pos = props.global.getNode("gear/gear[0]/position-norm"); var gear1_pos = props.globals.getNode("gear/gear[0]/position-norm", 1);
var gear2_pos = props.global.getNode("gear/gear[1]/position-norm"); var gear2_pos = props.globals.getNode("gear/gear[1]/position-norm", 1);
var gear3_pos = props.global.getNode("gear/gear[2]/position-norm"); var gear3_pos = props.globals.getNode("gear/gear[2]/position-norm", 1);
var gear_door_L = props.global.getNode("/systems/hydraulic/gear/door-left"); var gear_door_L = props.globals.getNode("/systems/hydraulic/gear/door-left", 1);
var gear_door_R = props.global.getNode("/systems/hydraulic/gear/door-right"); var gear_door_R = props.globals.getNode("/systems/hydraulic/gear/door-right", 1);
var gear_door_N = props.global.getNode("/systems/hydraulic/gear/door-nose"); var gear_door_N = props.globals.getNode("/systems/hydraulic/gear/door-nose", 1);
var gear_down = props.global.getNode("/controls/gear/gear-down"); var gear_down = props.globals.getNode("/controls/gear/gear-down", 1);
var askid = props.global.getNode("/systems/hydraulic/brakes/askidnwssw"); var askid = props.globals.getNode("/systems/hydraulic/brakes/askidnwssw", 1);
var brk_mode = props.global.getNode("/systems/hydraulic/brakes/mode"); var brk_mode = props.globals.getNode("/systems/hydraulic/brakes/mode", 1);
var accu_press = props.global.getNode("/systems/hydraulic/brakes/accumulator-pressure-psi"); var accu_press = props.globals.getNode("/systems/hydraulic/brakes/accumulator-pressure-psi", 1);
var press_vs_norm = props.global.getNode("/systems/pressurization/vs-norm"); var press_vs_norm = props.globals.getNode("/systems/pressurization/vs-norm", 1);
var cabinalt = props.global.getNode("/systems/pressurization/cabinalt-norm"); var cabinalt = props.globals.getNode("/systems/pressurization/cabinalt-norm", 1);
var gear0_wow = props.global.getNode("/gear/gear[0]/wow"); var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1);
var canvas_lowerECAM_base = { var canvas_lowerECAM_base = {
init: func(canvas_group, file) { init: func(canvas_group, file) {
@ -284,6 +284,7 @@ var canvas_lowerECAM_base = {
du4_test.setValue(1); du4_test.setValue(1);
du4_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1)); du4_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
du4_test_time.setValue(elapsedtime - 30); du4_test_time.setValue(elapsedtime - 30);
}
} else { } else {
du4_test.setValue(1); du4_test.setValue(1);
du4_test_amount.setValue(0); du4_test_amount.setValue(0);
@ -1215,7 +1216,7 @@ var canvas_lowerECAM_elec = {
# TR1 # TR1
# is only powered when ac1 has power # is only powered when ac1 has power
tr1_v = tr1_volts.getValue(); tr1_v = tr1_volts.getValue();
tr1_a = tr1_apms.getValue(); tr1_a = tr1_amps.getValue();
me["TR1Volt"].setText(sprintf("%s", math.round(tr1_v))); me["TR1Volt"].setText(sprintf("%s", math.round(tr1_v)));
me["TR1Ampere"].setText(sprintf("%s", math.round(tr1_a))); me["TR1Ampere"].setText(sprintf("%s", math.round(tr1_a)));
@ -1648,7 +1649,7 @@ var canvas_lowerECAM_elec = {
me["ELEC-Line-DC2-DCBAT"].show(); me["ELEC-Line-DC2-DCBAT"].show();
} }
if (switch_emer-gen.getValue() == 1 and (ac1.getValue() < 110 and switch_ac_ess_feed.getValue() == 0 or ac2.getValue() < 110 and switch_ac_ess_feed.getValue() == 1)) { if (switch_emer_gen.getValue() == 1 and (ac1.getValue() < 110 and switch_ac_ess_feed.getValue() == 0 or ac2.getValue() < 110 and switch_ac_ess_feed.getValue() == 1)) {
me["EMERGEN-out"].show(); me["EMERGEN-out"].show();
} else { } else {
me["EMERGEN-out"].hide(); me["EMERGEN-out"].hide();
@ -2165,7 +2166,7 @@ var canvas_lowerECAM_fuel = {
# TODO use the valve prop and add amber if diffrence between eng master and valve # TODO use the valve prop and add amber if diffrence between eng master and valve
# TODO add transition state # TODO add transition state
# TODO fix amber/green at the same time when closed # TODO fix amber/green at the same time when closed
if (cutoff_switch.getValue() == 0) { if (cutoff_switch2.getValue() == 0) {
me["FUEL-ENG-Master-2"].setRotation(0); me["FUEL-ENG-Master-2"].setRotation(0);
me["FUEL-ENG-Master-2"].setColor(0.0509,0.7529,0.2941); me["FUEL-ENG-Master-2"].setColor(0.0509,0.7529,0.2941);
me["FUEL-ENG-2-pipe"].setColor(0.0509,0.7529,0.2941); me["FUEL-ENG-2-pipe"].setColor(0.0509,0.7529,0.2941);
@ -2382,7 +2383,7 @@ var canvas_lowerECAM_hyd = {
if (ptu.getValue() == 1 and ptu_fault.getValue() == 0) { if (ptu.getValue() == 1 and ptu_fault.getValue() == 0) {
me["PTU-connection"].setColor(0.0509,0.7529,0.2941); me["PTU-connection"].setColor(0.0509,0.7529,0.2941);
if (put_active.getValue() == 1) { if (ptu_active.getValue() == 1) {
if (ptu_supplies.getValue() == "yellow") { if (ptu_supplies.getValue() == "yellow") {
me["PTU-Supply-Line"].show(); me["PTU-Supply-Line"].show();
me["PTU-supply-yellow"].show(); me["PTU-supply-yellow"].show();