update lights
This commit is contained in:
parent
cd4e236787
commit
f910bbb69f
21 changed files with 77 additions and 42 deletions
|
@ -233,7 +233,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>9.9</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>9.41</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>9.41</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>7.81</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>7.81</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>7.81</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>7.81</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>7.81</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>3.54</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>3.54</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -234,7 +234,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>3.54</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -234,7 +234,7 @@
|
|||
<name>Nosegear landing light ALS</name>
|
||||
<path>Aircraft/A320Family/Models/Lights/ALS/taxilight.xml</path>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<x-m>3.54</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>-2.5</z-m>
|
||||
</offsets>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<object-name>Rudder</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/lighting/nav-lights-switch</property>
|
||||
<value>2</value>
|
||||
<property>/sim/model/lights/logo-lights</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<emission>
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<animation>
|
||||
<type>scale</type>
|
||||
<x-offset>0.5</x-offset>
|
||||
<y-offset>0.5</y-offset>
|
||||
<z-offset>0.5</z-offset>
|
||||
<x-offset>1</x-offset>
|
||||
<y-offset>1</y-offset>
|
||||
<z-offset>1</z-offset>
|
||||
</animation>
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,13 @@ print("-------------------------------------------------------------------------
|
|||
print(" ");
|
||||
|
||||
# Dimmers
|
||||
setprop("/controls/lighting/ndl-norm", 0);
|
||||
setprop("/controls/lighting/ndr-norm", 0);
|
||||
setprop("/controls/lighting/upper-norm", 0);
|
||||
setprop("/controls/lighting/ndl-norm", 1);
|
||||
setprop("/controls/lighting/ndr-norm", 1);
|
||||
setprop("/controls/lighting/upper-norm", 1);
|
||||
|
||||
# Lights
|
||||
setprop("/sim/model/lights/nose-lights", 1);
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
setprop("/sim/model/lights/turnoffsw", 0);
|
||||
|
||||
# Oil Qty
|
||||
var qty1 = math.round((rand() * 5 ) + 20, 0.1);
|
||||
|
@ -43,38 +44,35 @@ var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.025, 1.5], "/cont
|
|||
|
||||
setlistener("controls/lighting/nav-lights-switch", func {
|
||||
var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
|
||||
var logo_lights = props.globals.getNode("/sim/model/lights/logo-lights");
|
||||
var setting = getprop("/controls/lighting/nav-lights-switch");
|
||||
if (setting == 1) {
|
||||
nav_lights.setBoolValue(1);
|
||||
logo_lights.setBoolValue(0);
|
||||
} else if (setting == 2) {
|
||||
nav_lights.setBoolValue(1);
|
||||
logo_lights.setBoolValue(1);
|
||||
} else {
|
||||
nav_lights.setBoolValue(0);
|
||||
logo_lights.setBoolValue(0);
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("controls/lighting/taxi-light-switch", func {
|
||||
var nose_lights = getprop("/sim/model/lights/nose-lights");
|
||||
var settingT = getprop("/controls/lighting/taxi-light-switch");
|
||||
var gear = getprop("/gear/gear[0]/position-norm");
|
||||
if (settingT == 0) {
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
} else if (settingT == 0.5) {
|
||||
} else if (settingT == 0.5 and gear > 0.9) {
|
||||
setprop("/sim/model/lights/nose-lights", 0.85);
|
||||
} else if (settingT == 1) {
|
||||
} else if (settingT == 1 and gear > 0.9) {
|
||||
setprop("/sim/model/lights/nose-lights", 1);
|
||||
}
|
||||
}, 1, 0);
|
||||
|
||||
|
||||
setlistener("controls/lighting/landing-lights[1]", func {
|
||||
var landl = getprop("/controls/lighting/landing-lights[1]");
|
||||
if (landl == 1) {
|
||||
setprop("/sim/rendering/als-secondary-lights/alt-landing-light",1);
|
||||
setprop("/sim/rendering/als-secondary-lights/use-landing-light",1);
|
||||
} else {
|
||||
setprop("/sim/rendering/als-secondary-lights/alt-landing-light",0);
|
||||
setprop("/sim/rendering/als-secondary-lights/use-landing-light",0);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -223,6 +221,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
setprop("/it-autoflight/input/fd2", 1);
|
||||
libraries.ECAMinit();
|
||||
libraries.variousReset();
|
||||
logoTimer.start();
|
||||
noseLoop.start();
|
||||
});
|
||||
|
||||
var librariesLoop = maketimer(0.1, func {
|
||||
|
@ -372,3 +372,38 @@ var flaptimer = maketimer(0.5, func {
|
|||
flaptimer.stop();
|
||||
}
|
||||
});
|
||||
|
||||
var logoTimer = maketimer(0.1, func {
|
||||
var logo_lights = props.globals.getNode("/sim/model/lights/logo-lights");
|
||||
var setting = getprop("/controls/lighting/nav-lights-switch");
|
||||
var wow = getprop("/gear/gear[2]/wow");
|
||||
var slats = getprop("/controls/flight/slats");
|
||||
if (setting == 2) {
|
||||
if (wow or slats == 1) {
|
||||
logo_lights.setBoolValue(1);
|
||||
} else if (!wow and slats < 1) {
|
||||
logo_lights.setBoolValue(0);
|
||||
} else {
|
||||
logo_lights.setBoolValue(0);
|
||||
print("Logo Lights: Unknown Condition"); # this is important for debugging
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var noseLoop = maketimer(0.1, func {
|
||||
var gear = getprop("/gear/gear[0]/position-norm");
|
||||
var nose_lights = getprop("/sim/model/lights/nose-lights");
|
||||
var settingT = getprop("/controls/lighting/taxi-light-switch");
|
||||
if (gear < 1) {
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
} else if (settingT == 0) {
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
} else if (settingT == 0.5 and gear > 0.9) {
|
||||
setprop("/sim/model/lights/nose-lights", 0.85);
|
||||
} else if (settingT == 1 and gear > 0.9) {
|
||||
setprop("/sim/model/lights/nose-lights", 1);
|
||||
} else {
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
print("Nose Lights: Unknown Condition"); # this is important for debugging
|
||||
}
|
||||
});
|
||||
|
|
Reference in a new issue