diff --git a/A320-main.xml b/A320-main.xml index e0a5dceb..3a955fc7 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -694,6 +694,10 @@ 0.5 100000 0.0 + 0 + 0 + 0.0 + 0.0 0 diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index c175a83c..655d0fc8 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -344,7 +344,7 @@ var beforestart_b = func { systems.ADIRS.skip(1); systems.ADIRS.skip(2); setprop("/controls/adirs/mcducbtn", 1); - setprop("/controls/lighting/beacon", 1); + setprop("/controls/switches/beacon", 1); setprop("/controls/lighting/nav-lights-switch", 1); setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[1]/on", 1); @@ -430,8 +430,8 @@ var taxi_b = func { setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); setprop("/controls/lighting/taxi-light-switch", 0.5); - setprop("/controls/lighting/landing-lights[1]", 0.5); - setprop("/controls/lighting/landing-lights[2]", 0.5); + setprop("/controls/switches/landing-lights-l", 0.5); + setprop("/controls/switches/landing-lights-r", 0.5); settimer(taxi_c, 2); } var taxi_c = func { @@ -466,8 +466,8 @@ var takeoff = func { removelistener(eng_one_chk_c); setprop("/controls/switches/strobe", 0.5); setprop("/controls/lighting/taxi-light-switch", 1); - setprop("/controls/lighting/landing-lights[1]", 1); - setprop("/controls/lighting/landing-lights[2]", 1); + setprop("/controls/switches/landing-lights-l", 1); + setprop("/controls/switches/landing-lights-r", 1); setprop("/controls/flight/speedbrake-arm", 1); setprop("/controls/flight/flaps", 0.290); setprop("/controls/flight/slats", 0.666); diff --git a/Models/Instruments/MCDU/MCDU1.xml b/Models/Instruments/MCDU/MCDU1.xml index 846bf4f0..afb1e4db 100644 --- a/Models/Instruments/MCDU/MCDU1.xml +++ b/Models/Instruments/MCDU/MCDU1.xml @@ -35,7 +35,7 @@ BRT - true + false @@ -58,7 +58,7 @@ DIM - true + false @@ -81,7 +81,7 @@ radnav - true + false nasal @@ -106,7 +106,7 @@ init - true + false nasal @@ -131,7 +131,7 @@ data - true + false nasal @@ -156,7 +156,7 @@ mcdu - true + false nasal @@ -181,7 +181,7 @@ perf - true + false nasal @@ -206,7 +206,7 @@ f-pln - true + false nasal @@ -231,7 +231,7 @@ fuel-pred - true + false nasal @@ -256,7 +256,7 @@ L1 - true + false nasal @@ -276,7 +276,7 @@ - true + false nasal @@ -300,7 +300,7 @@ L2 - true + false nasal @@ -320,7 +320,7 @@ - true + false nasal @@ -344,7 +344,7 @@ L3 - true + false nasal @@ -364,7 +364,7 @@ - true + false nasal @@ -388,7 +388,7 @@ L4 - true + false nasal @@ -408,7 +408,7 @@ - true + false nasal @@ -432,7 +432,7 @@ L5 - true + false nasal @@ -452,7 +452,7 @@ - true + false nasal @@ -476,7 +476,7 @@ L6 - true + false nasal @@ -496,7 +496,7 @@ - true + false nasal @@ -521,7 +521,7 @@ R1 - true + false nasal @@ -541,7 +541,7 @@ - true + false nasal @@ -565,7 +565,7 @@ R2 - true + false nasal @@ -585,7 +585,7 @@ - true + false nasal @@ -609,7 +609,7 @@ R3 - true + false nasal @@ -629,7 +629,7 @@ - true + false nasal @@ -653,7 +653,7 @@ R4 - true + false nasal @@ -673,7 +673,7 @@ - true + false nasal @@ -697,7 +697,7 @@ R5 - true + false nasal @@ -717,7 +717,7 @@ - true + false nasal @@ -741,7 +741,7 @@ R6 - true + false nasal @@ -761,7 +761,7 @@ - true + false nasal @@ -786,7 +786,7 @@ left - true + false nasal @@ -810,7 +810,7 @@ right - true + false nasal @@ -834,7 +834,7 @@ up - true + false nasal @@ -858,7 +858,7 @@ down - true + false nasal diff --git a/Models/Instruments/MCDU/MCDU2.xml b/Models/Instruments/MCDU/MCDU2.xml index 2aad6056..6bace350 100644 --- a/Models/Instruments/MCDU/MCDU2.xml +++ b/Models/Instruments/MCDU/MCDU2.xml @@ -35,7 +35,7 @@ BRT - true + false @@ -58,7 +58,7 @@ DIM - true + false @@ -81,7 +81,7 @@ radnav - true + false nasal @@ -106,7 +106,7 @@ init - true + false nasal @@ -131,7 +131,7 @@ data - true + false nasal @@ -156,7 +156,7 @@ mcdu - true + false nasal @@ -181,7 +181,7 @@ perf - true + false nasal @@ -206,7 +206,7 @@ f-pln - true + false nasal @@ -231,7 +231,7 @@ fuel-pred - true + false nasal @@ -256,7 +256,7 @@ L1 - true + false nasal @@ -276,7 +276,7 @@ - true + false nasal @@ -300,7 +300,7 @@ L2 - true + false nasal @@ -320,7 +320,7 @@ - true + false nasal @@ -344,7 +344,7 @@ L3 - true + false nasal @@ -364,7 +364,7 @@ - true + false nasal @@ -388,7 +388,7 @@ L4 - true + false nasal @@ -408,7 +408,7 @@ - true + false nasal @@ -432,7 +432,7 @@ L5 - true + false nasal @@ -452,7 +452,7 @@ - true + false nasal @@ -476,7 +476,7 @@ L6 - true + false nasal @@ -496,7 +496,7 @@ - true + false nasal @@ -521,7 +521,7 @@ R1 - true + false nasal @@ -541,7 +541,7 @@ - true + false nasal @@ -565,7 +565,7 @@ R2 - true + false nasal @@ -585,7 +585,7 @@ - true + false nasal @@ -609,7 +609,7 @@ R3 - true + false nasal @@ -629,7 +629,7 @@ - true + false nasal @@ -653,7 +653,7 @@ R4 - true + false nasal @@ -673,7 +673,7 @@ - true + false nasal @@ -697,7 +697,7 @@ R5 - true + false nasal @@ -717,7 +717,7 @@ - true + false nasal @@ -741,7 +741,7 @@ R6 - true + false nasal @@ -761,7 +761,7 @@ - true + false nasal @@ -786,7 +786,7 @@ left - true + false nasal @@ -810,7 +810,7 @@ right - true + false nasal @@ -834,7 +834,7 @@ up - true + false nasal @@ -858,7 +858,7 @@ down - true + false nasal diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index ee6d1b3f..02a32e9b 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -4680,7 +4680,7 @@ false property-toggle - controls/lighting/beacon + controls/switches/beacon nasal @@ -4692,7 +4692,7 @@ Beacon lights rotate rotate BeaconLtSwtch - controls/lighting/beacon + controls/switches/beacon 035 1-35 @@ -4718,7 +4718,7 @@ false property-toggle - controls/lighting/wing-lights + controls/switches/wing-lights nasal @@ -4730,7 +4730,7 @@ Wing lights rotate rotate WingLtSwtch - controls/lighting/wing-lights + controls/switches/wing-lights 035 1-35 @@ -4868,7 +4868,7 @@ false property-cycle - controls/lighting/landing-lights[1] + controls/switches/landing-lights-l 0 0.5 1 @@ -4883,7 +4883,7 @@ false property-cycle - controls/lighting/landing-lights[1] + controls/switches/landing-lights-l 1 0.5 0 @@ -4904,7 +4904,7 @@ false property-cycle - controls/lighting/landing-lights[2] + controls/switches/landing-lights-r 0 0.5 1 @@ -4919,7 +4919,7 @@ false property-cycle - controls/lighting/landing-lights[2] + controls/switches/landing-lights-r 1 0.5 0 @@ -4935,7 +4935,7 @@ landing light rotate rotate LandingLtLSwtch - controls/lighting/landing-lights[1] + controls/switches/landing-lights-l 035 1-35 @@ -4956,7 +4956,7 @@ landing light rotate rotate LandingLtRSwtch - controls/lighting/landing-lights[2] + controls/switches/landing-lights-r 035 1-35 diff --git a/Models/Lights/ALS/greennav.xml b/Models/Lights/ALS/greennav.xml index f817bf79..a0a1fbd4 100644 --- a/Models/Lights/ALS/greennav.xml +++ b/Models/Lights/ALS/greennav.xml @@ -7,8 +7,6 @@ green-navlight.ac - - Aircraft/IDG-A32X/Models/lights/ALS/green-navlight green-navlightals diff --git a/Models/Lights/greennav.xml b/Models/Lights/greennav.xml index dd49f873..0c2b8962 100644 --- a/Models/Lights/greennav.xml +++ b/Models/Lights/greennav.xml @@ -13,10 +13,10 @@ select Light - - controls/lighting/nav-lights-switch - 0 - + + /sim/model/lights/nav-lights + 1 + diff --git a/Models/Lights/landing-nose.xml b/Models/Lights/landing-nose.xml index ba342e38..e0325a0e 100644 --- a/Models/Lights/landing-nose.xml +++ b/Models/Lights/landing-nose.xml @@ -25,10 +25,16 @@ Cone - - systems/electrical/bus/ac-ess - 110 - + + + systems/electrical/bus/ac1 + 110 + + + systems/electrical/bus/ac2 + 110 + + /sim/model/lights/nose-lights 0.5 diff --git a/Models/Lights/landing-port.xml b/Models/Lights/landing-port.xml index 66584fe6..b59898fb 100644 --- a/Models/Lights/landing-port.xml +++ b/Models/Lights/landing-port.xml @@ -26,7 +26,7 @@ - systems/electrical/bus/ac-ess + systems/electrical/bus/ac1 110 controls/lighting/landing-lights[2] diff --git a/Models/Lights/landing-stbd.xml b/Models/Lights/landing-stbd.xml index 59e22f55..f8f2a212 100644 --- a/Models/Lights/landing-stbd.xml +++ b/Models/Lights/landing-stbd.xml @@ -28,7 +28,7 @@ - systems/electrical/bus/ac-ess + systems/electrical/bus/ac2 110 controls/lighting/landing-lights[2] diff --git a/Models/Lights/rednav.xml b/Models/Lights/rednav.xml index 29441192..99e2937e 100644 --- a/Models/Lights/rednav.xml +++ b/Models/Lights/rednav.xml @@ -13,10 +13,10 @@ select Light - - controls/lighting/nav-lights-switch - 0 - + + /sim/model/lights/nav-lights + 1 + diff --git a/Models/Lights/tailnav.xml b/Models/Lights/tailnav.xml index 2412f200..e99277d5 100644 --- a/Models/Lights/tailnav.xml +++ b/Models/Lights/tailnav.xml @@ -13,10 +13,10 @@ select Light - - controls/lighting/nav-lights-switch - 0 - + + /sim/model/lights/nav-lights + 1 + diff --git a/Nasal/buttons.nas b/Nasal/buttons.nas index 2327ecf1..9d34377a 100644 --- a/Nasal/buttons.nas +++ b/Nasal/buttons.nas @@ -35,6 +35,10 @@ var variousReset = func { setprop("/controls/switches/wiperRspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI setprop("/controls/lighting/strobe", 0); setprop("/controls/lighting/beacon", 0); + setprop("/controls/switches/beacon", 0); + setprop("/controls/switches/wing-lights", 0); + setprop("/controls/switches/landing-lights-l", 0); + setprop("/controls/switches/landing-lights-r", 0); setprop("/controls/lighting/wing-lights", 0); setprop("/controls/lighting/nav-lights-switch", 0); setprop("/controls/lighting/landing-lights[1]", 0); diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index f4de37fc..00aac91c 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -40,6 +40,7 @@ setprop("/engines/engine[1]/oil-qt-actual", qty2); ########## var beacon_switch = props.globals.getNode("/controls/switches/beacon", 1); +var beacon_ctl = props.globals.getNode("/controls/lighting/beacon", 1); var beacon = aircraft.light.new("/sim/model/lights/beacon", [0.1, 1], "/controls/lighting/beacon"); var strobe_switch = props.globals.getNode("/controls/switches/strobe", 1); var strobe_light = props.globals.getNode("/controls/lighting/strobe", 1); @@ -47,6 +48,8 @@ var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.05, 0.06, 0.05, 1 var tail_strobe = aircraft.light.new("/sim/model/lights/tailstrobe", [0.1, 1], "/controls/lighting/strobe"); var logo_lights = getprop("/sim/model/lights/logo-lights"); var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights"); +var wing_switch = props.globals.getNode("/controls/switches/wing-lights", 1); +var wing_ctl = props.globals.getNode("/controls/lighting/wing-lights", 1); var dome_light = props.globals.initNode("/sim/model/lights/dome-light", 0.0, "DOUBLE"); var wow = getprop("/gear/gear[2]/wow"); var slats = getprop("/controls/flight/slats"); @@ -58,8 +61,10 @@ var settingT = getprop("/controls/lighting/taxi-light-switch"); var settingTurnoff = getprop("/controls/lighting/turnoff-light-switch"); var setting = getprop("/controls/lighting/nav-lights-switch"); var domeSetting = getprop("/controls/lighting/dome-norm"); -var landl = getprop("/controls/lighting/landing-lights[1]"); -var landr = getprop("/controls/lighting/landing-lights[2]"); +var landL = props.globals.getNode("controls/lighting/landing-lights[1]", 1); +var landR = props.globals.getNode("controls/lighting/landing-lights[2]", 1); +var landlSw = props.globals.getNode("/controls/switches/landing-lights-l", 1); +var landrSw = props.globals.getNode("/controls/switches/landing-lights-r", 1); ################### # Tire Smoke/Rain # @@ -505,7 +510,7 @@ var lightsLoop = maketimer(0.2, func { wow = getprop("/gear/gear[2]/wow"); slats = getprop("/controls/flight/slats"); - if (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0) { + if (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0 or getprop("/systems/electrical/bus/dc1") > 0 or getprop("/systems/electrical/bus/dc2") > 0) { setprop("/systems/electrical/nav-lights-power", 1); } else { setprop("/systems/electrical/nav-lights-power", 0); @@ -540,15 +545,45 @@ var lightsLoop = maketimer(0.2, func { # strobe strobe_sw = strobe_switch.getValue(); - if (strobe_sw == 1) { + if (strobe_sw == 1 and getprop("/systems/electrical/bus/ac2") > 0) { strobe_light.setValue(1); - } elsif (strobe_sw == 0.5 and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) { + } elsif (strobe_sw == 0.5 and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/systems/electrical/bus/ac2") > 0) { # todo: use lgciu output 5 strobe_light.setValue(1); } else { strobe_light.setValue(0); } + # beacon + + if (beacon_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0)) { + beacon_ctl.setValue(1); + } else { + beacon_ctl.setValue(0); + } + + # wing + + if (wing_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0)) { + wing_ctl.setValue(1); + } else { + wing_ctl.setValue(0); + } + + # landL + + if (landlSw.getValue() == 1 and getprop("/systems/electrical/bus/ac1") > 0) { + landL.setValue(1); + } else { + landL.setValue(0); + } + + if (landrSw.getValue() == 1 and getprop("/systems/electrical/bus/ac2") > 0) { + landR.setValue(1); + } else { + landR.setValue(0); + } + # signs if (getprop("/systems/pressurization/cabinalt-norm") > 11300) { diff --git a/revision.txt b/revision.txt index d797b348..7b854259 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4764 \ No newline at end of file +4765 \ No newline at end of file