diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 576aafd7..938ffaa1 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -5635,26 +5635,49 @@ beam_f sfl.001 sfl.011 + sfl.012 + sfl.014 WindowCpt WindowFo ohpanel2 + efis_box_1 + efis_box_2 efis_box_3 efis_box_4 main_panel + poly000041 side_base.002 + pedals_block_capt so.1 sts sts.001 sts.003 sts.004 wall_1 + carpet + DoorC pedestal1 pedestal2 + pedestal3 + ped_footrest + pedestal_low + thr_quad + trim_1 + trim_2 + fcu_panel + seat1 + seat4 + seat6 + seat7 + compass_box + iesi + clock_body + gear_lever_body 0.3 0.3 0.3 - controls/lighting/dome-norm + sim/model/lights/dome-light @@ -5667,7 +5690,7 @@ 0.8 0.8 0.8 - controls/lighting/dome-norm + sim/model/lights/dome-light diff --git a/Models/Instruments/ATC/ATC.xml b/Models/Instruments/ATC/ATC.xml index f445b402..2bbd266e 100644 --- a/Models/Instruments/ATC/ATC.xml +++ b/Models/Instruments/ATC/ATC.xml @@ -10,4 +10,15 @@ res/ATC.ac + + Panel lighting + material + atc_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + diff --git a/Models/Instruments/Audio/Audio1.xml b/Models/Instruments/Audio/Audio1.xml index a24ab8f1..5e9fe569 100644 --- a/Models/Instruments/Audio/Audio1.xml +++ b/Models/Instruments/Audio/Audio1.xml @@ -10,4 +10,15 @@ res/Audio1.ac + + Panel lighting + material + audio_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + diff --git a/Models/Instruments/Audio/Audio2.xml b/Models/Instruments/Audio/Audio2.xml index a24ab8f1..5e9fe569 100644 --- a/Models/Instruments/Audio/Audio2.xml +++ b/Models/Instruments/Audio/Audio2.xml @@ -10,4 +10,15 @@ res/Audio1.ac + + Panel lighting + material + audio_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + diff --git a/Models/Instruments/MCDU/MCDU1.xml b/Models/Instruments/MCDU/MCDU1.xml index 551db650..cf4b277a 100644 --- a/Models/Instruments/MCDU/MCDU1.xml +++ b/Models/Instruments/MCDU/MCDU1.xml @@ -1372,4 +1372,16 @@ + + Panel lighting + material + mcdu_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + + diff --git a/Models/Instruments/MCDU/MCDU2.xml b/Models/Instruments/MCDU/MCDU2.xml index 3dfb0167..7c780a5e 100644 --- a/Models/Instruments/MCDU/MCDU2.xml +++ b/Models/Instruments/MCDU/MCDU2.xml @@ -1372,4 +1372,16 @@ + + Panel lighting + material + mcdu_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + + diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 7614c8e7..e98f8cd4 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -985,7 +985,7 @@ 0.3 0.3 0.3 - controls/lighting/dome-norm + sim/model/lights/dome-light diff --git a/Models/Instruments/Pedestal_up/Pedestal_up.xml b/Models/Instruments/Pedestal_up/Pedestal_up.xml index c6615aa6..ccd39add 100644 --- a/Models/Instruments/Pedestal_up/Pedestal_up.xml +++ b/Models/Instruments/Pedestal_up/Pedestal_up.xml @@ -10,4 +10,26 @@ res/Pedestal_up.ac + + Panel lighting + material + atc_body + ecam_body + ecam_switch_body + engine_body + radar_body + vu111_body + vu112_body + throttle_1 + throttle_1_label + dummy_1 + dummy_2 + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + + diff --git a/Models/Instruments/Radio/Radio1.xml b/Models/Instruments/Radio/Radio1.xml index 8db29c59..b7ba778d 100644 --- a/Models/Instruments/Radio/Radio1.xml +++ b/Models/Instruments/Radio/Radio1.xml @@ -1704,5 +1704,17 @@ 0.08 + + + Panel lighting + material + radio_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + diff --git a/Models/Instruments/Radio/Radio2.xml b/Models/Instruments/Radio/Radio2.xml index 16e893b9..a8d1e75f 100644 --- a/Models/Instruments/Radio/Radio2.xml +++ b/Models/Instruments/Radio/Radio2.xml @@ -1704,5 +1704,17 @@ 0.08 + + + Panel lighting + material + radio_body + + 0.3 + 0.3 + 0.3 + sim/model/lights/dome-light + + diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas index bc6ce323..f7baaf58 100644 --- a/Nasal/electrical.nas +++ b/Nasal/electrical.nas @@ -118,7 +118,7 @@ var light = { power_consumption: func() { if (getprop(me.control_prop) != 0 and getprop(me.elec_prop) != 0) { - light_power_consumption = me.max_watts; + light_power_consumption = me.max_watts * getprop(me.control_prop); } else { light_power_consumption = 0; } @@ -265,7 +265,10 @@ var ELEC = { light.new(name: "left-turnoff", max_watts:21, control_prop:"/controls/lighting/leftturnoff", elec_prop:"/systems/electrical/bus/ac1"), light.new(name: "right-turnoff", max_watts:21, control_prop:"/controls/lighting/rightturnoff", elec_prop:"/systems/electrical/bus/ac2"), light.new(name: "left-wing", max_watts:24, control_prop:"/controls/lighting/wing-lights", elec_prop:"/systems/electrical/bus/ac1"), - light.new(name: "right-wing", max_watts:24, control_prop:"/controls/lighting/wing-lights", elec_prop:"/systems/electrical/bus/ac2")]; + light.new(name: "right-wing", max_watts:24, control_prop:"/controls/lighting/wing-lights", elec_prop:"/systems/electrical/bus/ac2"), + + light.new(name: "left-dome", max_watts:10, control_prop:"/controls/lighting/dome-norm", elec_prop:"/systems/electrical/bus/dc-ess"), + light.new(name: "right-dome", max_watts:10, control_prop:"/controls/lighting/dome-norm", elec_prop:"/systems/electrical/bus/dc-ess")]; }, loop: func() { galley_sw = getprop("/controls/electrical/switches/galley"); diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index a9dfecbf..4b9e5f00 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -40,6 +40,7 @@ var tail_strobe_switch = props.globals.getNode("/controls/switches/tailstrobe", 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 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"); var gear = getprop("/gear/gear[0]/position-norm"); @@ -49,6 +50,7 @@ var right_turnoff_light = props.globals.getNode("/controls/lighting/rightturnoff 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]"); @@ -458,6 +460,7 @@ var lightsLoop = maketimer(0.2, func { gear = getprop("/gear/gear[0]/position-norm"); nose_lights = getprop("/sim/model/lights/nose-lights"); settingT = getprop("/controls/lighting/taxi-light-switch"); + domeSetting = getprop("/controls/lighting/dome-norm"); # nose lights @@ -516,6 +519,14 @@ var lightsLoop = maketimer(0.2, func { } else { nav_lights.setBoolValue(0); } + + if (domeSetting == 0.5 and getprop("/systems/electrical/bus/dc-ess") > 0) { + dome_light.setValue(0.5); + } elsif (domeSetting == 1 and getprop("/systems/electrical/bus/dc-ess") > 0) { + dome_light.setValue(1); + } else { + dome_light.setValue(0); + } }); var lTray = func {