Update OHpanel for Bleed valves, fix some colors and button pos, Simplify Pneumatic into an update function, less resource load, Clean up code, etc

This commit is contained in:
Joshua Davidson 2017-04-25 13:13:15 -04:00
parent e2dc729bfc
commit d6018aeb7c
17 changed files with 1313 additions and 856 deletions

View file

@ -87,11 +87,11 @@
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file> <file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig> </acconfig>
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file> <file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
<!--file>Aircraft/A320Family/Nasal/hydraulics.nas</file-->
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -80,11 +80,11 @@
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file> <file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig> </acconfig>
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file> <file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
<!--file>Aircraft/A320Family/Nasal/hydraulics.nas</file-->
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -80,11 +80,11 @@
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file> <file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig> </acconfig>
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file> <file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
<!--file>Aircraft/A320Family/Nasal/hydraulics.nas</file-->
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -86,11 +86,11 @@
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file> <file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig> </acconfig>
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file> <file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
<!--file>Aircraft/A320Family/Nasal/hydraulics.nas</file-->
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -27,8 +27,6 @@ var colddark = func {
setprop("/controls/engines/engine-start-switch", 1); setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1); setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1); setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/electrical/switches/gen1", 0);
setprop("/controls/electrical/switches/gen2", 0);
setprop("/controls/flight/slats", 0.000); setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flaps", 0.000); setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/flap-lever", 0); setprop("/controls/flight/flap-lever", 0);
@ -36,6 +34,7 @@ var colddark = func {
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
systems.elec_init(); systems.elec_init();
systems.ADIRSreset(); systems.ADIRSreset();
systems.pneumatics_init();
itaf.ap_init(); itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
@ -71,8 +70,6 @@ var beforestart = func {
setprop("/controls/engines/engine-start-switch", 1); setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1); setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1); setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/electrical/switches/gen1", 0);
setprop("/controls/electrical/switches/gen2", 0);
setprop("/controls/flight/slats", 0.000); setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flaps", 0.000); setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/flap-lever", 0); setprop("/controls/flight/flap-lever", 0);
@ -80,6 +77,7 @@ var beforestart = func {
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
systems.elec_init(); systems.elec_init();
systems.ADIRSreset(); systems.ADIRSreset();
systems.pneumatics_init();
itaf.ap_init(); itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
@ -96,7 +94,7 @@ var beforestart = func {
setprop("/controls/APU/master", 1); setprop("/controls/APU/master", 1);
setprop("/controls/APU/start", 1); setprop("/controls/APU/start", 1);
var apu_rpm_chk = setlistener("/systems/apu/rpm", func { var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
if (getprop("/systems/apu/rpm") >= 99) { if (getprop("/systems/apu/rpm") >= 98) {
removelistener(apu_rpm_chk); removelistener(apu_rpm_chk);
beforestart_b(); beforestart_b();
} }
@ -109,6 +107,8 @@ var beforestart_b = func {
setprop("/controls/bleed/OHP/bleedapu", 1); setprop("/controls/bleed/OHP/bleedapu", 1);
setprop("/controls/electrical/switches/gen1", 1); setprop("/controls/electrical/switches/gen1", 1);
setprop("/controls/electrical/switches/gen2", 1); setprop("/controls/electrical/switches/gen2", 1);
setprop("/controls/bleed/OHP/bleed1", 1);
setprop("/controls/bleed/OHP/bleed2", 1);
setprop("controls/adirs/ir[0]/knob","2"); setprop("controls/adirs/ir[0]/knob","2");
setprop("controls/adirs/ir[1]/knob","2"); setprop("controls/adirs/ir[1]/knob","2");
setprop("controls/adirs/ir[2]/knob","2"); setprop("controls/adirs/ir[2]/knob","2");
@ -131,8 +131,6 @@ var taxi = func {
setprop("/controls/engines/engine-start-switch", 1); setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1); setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1); setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/electrical/switches/gen1", 0);
setprop("/controls/electrical/switches/gen2", 0);
setprop("/controls/flight/slats", 0.000); setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flaps", 0.000); setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/flap-lever", 0); setprop("/controls/flight/flap-lever", 0);
@ -140,6 +138,7 @@ var taxi = func {
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
systems.elec_init(); systems.elec_init();
systems.ADIRSreset(); systems.ADIRSreset();
systems.pneumatics_init();
itaf.ap_init(); itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
@ -169,6 +168,8 @@ var taxi_b = func {
setprop("/controls/bleed/OHP/bleedapu", 1); setprop("/controls/bleed/OHP/bleedapu", 1);
setprop("/controls/electrical/switches/gen1", 1); setprop("/controls/electrical/switches/gen1", 1);
setprop("/controls/electrical/switches/gen2", 1); setprop("/controls/electrical/switches/gen2", 1);
setprop("/controls/bleed/OHP/bleed1", 1);
setprop("/controls/bleed/OHP/bleed2", 1);
setprop("controls/adirs/ir[0]/knob","2"); setprop("controls/adirs/ir[0]/knob","2");
setprop("controls/adirs/ir[1]/knob","2"); setprop("controls/adirs/ir[1]/knob","2");
setprop("controls/adirs/ir[2]/knob","2"); setprop("controls/adirs/ir[2]/knob","2");
@ -220,7 +221,7 @@ var takeoff = func {
setprop("/controls/flight/slats", 0.666); setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1); setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-txt", "1+F"); setprop("/controls/flight/flap-txt", "1+F");
setprop("/controls/flight/elevator-trim", -0.1); setprop("/controls/flight/elevator-trim", -0.15);
} }
}); });
} }

View file

@ -3806,6 +3806,43 @@
<!-- Standby Attitude Indicator --> <!-- Standby Attitude Indicator -->
<animation>
<type>select</type>
<object-name>stby-ai</object-name>
<condition>
<or>
<and>
<or>
<equals>
<property>/controls/electrical/switches/battery1</property>
<value>1</value>
</equals>
<equals>
<property>/controls/electrical/switches/battery2</property>
<value>1</value>
</equals>
</or>
<less-than>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</less-than>
<less-than>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</less-than>
</and>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
</animation>
<animation> <animation>
<type>texmultiple</type> <type>texmultiple</type>
<object-name>stby-ai</object-name> <object-name>stby-ai</object-name>

View file

@ -110,7 +110,7 @@
<condition> <condition>
<greater-than> <greater-than>
<property>/systems/apu/rpm</property> <property>/systems/apu/rpm</property>
<value>98.0</value> <value>94.9</value>
</greater-than> </greater-than>
</condition> </condition>
</layer> </layer>

View file

@ -94,6 +94,10 @@
<object-name>BatteryBtn22O</object-name> <object-name>BatteryBtn22O</object-name>
<object-name>Battery-lvl</object-name> <object-name>Battery-lvl</object-name>
<object-name>BusTieBtn2O</object-name> <object-name>BusTieBtn2O</object-name>
<object-name>Eng1BleedBtn1F</object-name>
<object-name>Eng1BleedBtn2O</object-name>
<object-name>Eng2BleedBtn1F</object-name>
<object-name>Eng2BleedBtn2O</object-name>
<object-name>ExtPwrBtn1A</object-name> <object-name>ExtPwrBtn1A</object-name>
<object-name>ExtPwrBtn2O</object-name> <object-name>ExtPwrBtn2O</object-name>
<object-name>GalleyPwrBtn1F</object-name> <object-name>GalleyPwrBtn1F</object-name>
@ -1849,26 +1853,50 @@
<type>pick</type> <type>pick</type>
<object-name>Eng1BleedBtn1</object-name> <object-name>Eng1BleedBtn1</object-name>
<object-name>Eng1BleedBtn2</object-name> <object-name>Eng1BleedBtn2</object-name>
<object-name>Eng1BleedBtn1F</object-name>
<object-name>Eng1BleedBtn2O</object-name>
<action> <action>
<button>0</button> <button>0</button>
<repeatable type="bool">false</repeatable> <repeatable type="bool">false</repeatable>
<binding> <binding>
<command>property-toggle</command> <command>property-toggle</command>
<property>controls/bleed/OHP/bleed1</property> <property>/controls/bleed/OHP/bleed1</property>
</binding> </binding>
</action> </action>
</animation> </animation>
<animation> <animation>
<name>Engine 1 bleed on</name> <type>select</type>
<type>textranslate</type> <object-name>Eng1BleedBtn1F</object-name>
<object-name>Eng1BleedBtn2</object-name> <condition>
<property>controls/bleed/OHP/bleed1</property> <or>
<factor>0.5</factor> <greater-than>
<axis> <property>/systems/unused/unused-oh</property>
<x>1</x> <value>150</value> <!-- I didn't model faults yet -->
<y>0</y> </greater-than>
</axis> <equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng1BleedBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/bleed/OHP/bleed1</property>
<value>0</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation> </animation>
<animation> <animation>
@ -1883,7 +1911,7 @@
<repeatable type="bool">false</repeatable> <repeatable type="bool">false</repeatable>
<binding> <binding>
<command>property-toggle</command> <command>property-toggle</command>
<property>controls/bleed/OHP/bleedapu</property> <property>/controls/bleed/OHP/bleedapu</property>
</binding> </binding>
</action> </action>
</animation> </animation>
@ -1911,7 +1939,7 @@
<condition> <condition>
<or> <or>
<equals> <equals>
<property>/controls/APU/bleed</property> <property>/controls/bleed/OHP/bleedapu</property>
<value>1</value> <value>1</value>
</equals> </equals>
<equals> <equals>
@ -1927,25 +1955,50 @@
<type>pick</type> <type>pick</type>
<object-name>Eng2BleedBtn1</object-name> <object-name>Eng2BleedBtn1</object-name>
<object-name>Eng2BleedBtn2</object-name> <object-name>Eng2BleedBtn2</object-name>
<object-name>Eng2BleedBtn1F</object-name>
<object-name>Eng2BleedBtn2O</object-name>
<action> <action>
<button>0</button> <button>0</button>
<repeatable type="bool">false</repeatable> <repeatable type="bool">false</repeatable>
<binding> <binding>
<command>property-toggle</command> <command>property-toggle</command>
<property>controls/bleed/OHP/bleed2</property> <property>/controls/bleed/OHP/bleed2</property>
</binding> </binding>
</action> </action>
</animation> </animation>
<animation> <animation>
<name>Engine 2 bleed on</name> <type>select</type>
<type>textranslate</type> <object-name>Eng2BleedBtn1F</object-name>
<object-name>Eng2BleedBtn2</object-name> <condition>
<property>controls/bleed/OHP/bleed2</property> <or>
<factor>0.5</factor> <greater-than>
<axis> <property>/systems/unused/unused-oh</property>
<x>1</x> <value>150</value> <!-- I didn't model faults yet -->
<y>0</y> </greater-than>
</axis> <equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng2BleedBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/bleed/OHP/bleed2</property>
<value>0</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation> </animation>
<animation> <animation>
@ -2321,7 +2374,8 @@
<property>/controls/APU/master</property> <property>/controls/APU/master</property>
</binding> </binding>
</action> </action>
</animation><!-- I didn't model faults yet --> </animation>
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>APUMasterBtn1F</object-name> <object-name>APUMasterBtn1F</object-name>
@ -2338,6 +2392,7 @@
</or> </or>
</condition> </condition>
</animation> </animation>
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>APUMasterBtn2O</object-name> <object-name>APUMasterBtn2O</object-name>
@ -2367,18 +2422,19 @@
<repeatable type="bool">false</repeatable> <repeatable type="bool">false</repeatable>
<binding> <binding>
<command>property-toggle</command> <command>property-toggle</command>
<property>controls/APU/start</property> <property>/controls/APU/start</property>
</binding> </binding>
</action> </action>
</animation> </animation>
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>APUStartBtn1A</object-name> <object-name>APUStartBtn1A</object-name>
<condition> <condition>
<or> <or>
<greater-than> <greater-than>
<property>controls/APU/start</property> <property>/systems/apu/rpm</property>
<value>99</value> <value>94.9</value>
</greater-than> </greater-than>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
@ -2387,6 +2443,7 @@
</or> </or>
</condition> </condition>
</animation> </animation>
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>APUStartBtn2O</object-name> <object-name>APUStartBtn2O</object-name>

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,151 @@
AC3Db AC3Db
MATERIAL "DefaultWhite.001" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0 0 0 shi 64 trans 0 MATERIAL "DefaultWhite.001" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0 0 0 shi 64 trans 0
MATERIAL "Metal" rgb 0.071878 0.071878 0.071878 amb 0 0 0 emis 0 0 0 spec 0 0 0.0156863 shi 32 trans 0 MATERIAL "Metal" rgb 0.071878 0.071878 0.071878 amb 0 0 0 emis 0 0 0 spec 0 0 0.0156863 shi 32 trans 0
MATERIAL "OHPRedButton" rgb 1 0 0 amb 1 0 0 emis 0 0 0 spec 1 1 1 shi 32 trans 0 MATERIAL "OHPRedButton" rgb 1 0 0 amb 1 0 0 emis 1 0 0 spec 1 1 1 shi 32 trans 0
MATERIAL "Switch" rgb 0.504688 0.504688 0.504688 amb 0.5 0.5 0.5 emis 0 0 0 spec 0 0 0.0235294 shi 32 trans 0.004 MATERIAL "Switch" rgb 0.504688 0.504688 0.504688 amb 0.5 0.5 0.5 emis 0 0 0 spec 0 0 0.0235294 shi 32 trans 0.004
MATERIAL "ac3dmat1" rgb 0.992157 0.992157 0.992157 amb 0.2 0.2 0.2 emis 1 1 1 spec 0 0 0 shi 128 trans 0 MATERIAL "ac3dmat1" rgb 0.992157 0.992157 0.992157 amb 0.2 0.2 0.2 emis 1 1 1 spec 0 0 0 shi 128 trans 0
MATERIAL "OHPanelOnBat" rgb 0.8 0.8 0.8 amb 1 1 1 emis 1 1 1 spec 0.5 0.5 0.5 shi 12 trans 0 MATERIAL "OHPanelOnBat" rgb 0.8 0.8 0.8 amb 1 1 1 emis 1 1 1 spec 0.5 0.5 0.5 shi 12 trans 0
MATERIAL "Switch" rgb 0.678431 0.678431 0.678431 amb 0.678431 0.678431 0.678431 emis 0 0 0 spec 0 0 0 shi 32 trans 0.004 MATERIAL "Switch" rgb 0.678431 0.678431 0.678431 amb 0.678431 0.678431 0.678431 emis 0 0 0 spec 0 0 0 shi 32 trans 0.004
OBJECT world OBJECT world
kids 234 kids 238
OBJECT poly
name "Eng1BleedBtn2O"
loc 0.0014462 -0.12015 0.05705
data 8
Cube.062
texture "buttons2.png"
crease 30.000000
numvert 8
-0.007 -0.0564 0.0314
-0.007 -0.0564 0.0514
-0.01 -0.0564 0.0514
-0.01 -0.0564 0.0314
-0.007 -0.0464 0.0314
-0.007 -0.0464 0.0514
-0.01 -0.0464 0.0514
-0.01 -0.0464 0.0314
numsurf 4
SURF 0x0
mat 4
refs 4
0 0.5 0
1 0 1.19209e-007
2 0 1.19209e-007
3 0.5 0
SURF 0x0
mat 4
refs 4
0 0.5 0
4 0.5 0.25
5 9.31321e-008 0.25
1 0 1.19209e-007
SURF 0x0
mat 4
refs 4
1 0 1.19209e-007
5 9.31321e-008 0.25
6 9.31321e-008 0.25
2 0 1.19209e-007
SURF 0x0
mat 4
refs 4
4 0.5 0.25
0 0.5 0
3 0.5 0
7 0.5 0.25
kids 0
OBJECT poly
name "Eng2BleedBtn1F"
loc 0.0014462 -0.12015 -0.14035
data 8
Cube.061
texture "buttons2.png"
crease 30.000000
numvert 8
-0.007 -0.0464 0.0314
-0.007 -0.0464 0.0514
-0.01 -0.0464 0.0514
-0.01 -0.0464 0.0314
-0.007 -0.0364 0.0314
-0.007 -0.0364 0.0514
-0.01 -0.0364 0.0514
-0.01 -0.0364 0.0314
numsurf 4
SURF 0x0
mat 4
refs 4
4 0.5 0.5
7 0.5 0.5
6 9.31321e-008 0.5
5 9.31321e-008 0.5
SURF 0x0
mat 4
refs 4
0 0.5 0.25
4 0.5 0.5
5 9.31321e-008 0.5
1 0 0.25
SURF 0x0
mat 4
refs 4
1 0 0.25
5 9.31321e-008 0.5
6 9.31321e-008 0.5
2 0 0.25
SURF 0x0
mat 4
refs 4
4 0.5 0.5
0 0.5 0.25
3 0.5 0.25
7 0.5 0.5
kids 0
OBJECT poly
name "Eng1BleedBtn1F"
loc 0.0014462 -0.12015 0.05705
data 8
Cube.061
texture "buttons2.png"
crease 30.000000
numvert 8
-0.01 -0.0364 0.0314
-0.01 -0.0364 0.0514
-0.007 -0.0364 0.0514
-0.007 -0.0364 0.0314
-0.01 -0.0464 0.0314
-0.01 -0.0464 0.0514
-0.007 -0.0464 0.0514
-0.007 -0.0464 0.0314
numsurf 4
SURF 0x0
mat 4
refs 4
3 0.5 0.5
7 0.5 0.25
4 0.5 0.25
0 0.5 0.5
SURF 0x0
mat 4
refs 4
6 0 0.25
2 9.31321e-008 0.5
1 9.31321e-008 0.5
5 0 0.25
SURF 0x0
mat 4
refs 4
7 0.5 0.25
3 0.5 0.5
2 9.31321e-008 0.5
6 0 0.25
SURF 0x0
mat 4
refs 4
3 0.5 0.5
0 0.5 0.5
1 9.31321e-008 0.5
2 9.31321e-008 0.5
kids 0
OBJECT poly OBJECT poly
name "IrsOnBatLightOB" name "IrsOnBatLightOB"
loc 0.0080412 0.188693 0.282104 loc 0.0080412 0.188693 0.282104
@ -1214,81 +1352,81 @@ numvert 14
-0.01 0.1833 0.101359 -0.01 0.1833 0.101359
numsurf 12 numsurf 12
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
0 1 1 0 1 1
3 1 1 3 1 1
2 4.43487e-008 1 2 4.43487e-008 1
1 4.43487e-008 1 1 4.43487e-008 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
5 0 0.195122 5 0 0.195122
1 4.43487e-008 1 1 4.43487e-008 1
2 4.43487e-008 1 2 4.43487e-008 1
6 0 0.195122 6 0 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
0 1 1 0 1 1
4 1 0.195122 4 1 0.195122
7 1 0.195122 7 1 0.195122
3 1 1 3 1 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
5 0 0.195122 5 0 0.195122
9 0.325 0.195122 9 0.325 0.195122
1 4.43487e-008 1 1 4.43487e-008 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
4 1 0.195122 4 1 0.195122
0 1 1 0 1 1
8 0.675 0.195122 8 0.675 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
4 1 0.195122 4 1 0.195122
8 0.675 0.195122 8 0.675 0.195122
11 0.675 0.195122 11 0.675 0.195122
7 1 0.195122 7 1 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
9 0.325 0.195122 9 0.325 0.195122
5 0 0.195122 5 0 0.195122
6 0 0.195122 6 0 0.195122
10 0.325 0.195122 10 0.325 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
0 1 1 0 1 1
1 4.43487e-008 1 1 4.43487e-008 1
9 0.325 0.195122 9 0.325 0.195122
8 0.675 0.195122 8 0.675 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
10 0.325 0.195122 10 0.325 0.195122
11 0.675 0.195122 11 0.675 0.195122
12 0.56125 0 12 0.56125 0
13 0.43875 0 13 0.43875 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
8 0.675 0.195122 8 0.675 0.195122
9 0.325 0.195122 9 0.325 0.195122
13 0.43875 0 13 0.43875 0
12 0.56125 0 12 0.56125 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
9 0.325 0.195122 9 0.325 0.195122
10 0.325 0.195122 10 0.325 0.195122
13 0.43875 0 13 0.43875 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
11 0.675 0.195122 11 0.675 0.195122
8 0.675 0.195122 8 0.675 0.195122
@ -13271,80 +13409,80 @@ numvert 14
-0.007 0.2243 0.066 -0.007 0.2243 0.066
numsurf 12 numsurf 12
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
2 0.675 0.195122 2 0.675 0.195122
5 0.675 0.195122 5 0.675 0.195122
1 0.56125 0 1 0.56125 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
4 0.325 0.195122 4 0.325 0.195122
3 0.325 0.195122 3 0.325 0.195122
0 0.43875 0 0 0.43875 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
5 0.675 0.195122 5 0.675 0.195122
4 0.325 0.195122 4 0.325 0.195122
0 0.43875 0 0 0.43875 0
1 0.56125 0 1 0.56125 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
3 0.325 0.195122 3 0.325 0.195122
2 0.675 0.195122 2 0.675 0.195122
1 0.56125 0 1 0.56125 0
0 0.43875 0 0 0.43875 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
13 1 1 13 1 1
12 4.43487e-008 1 12 4.43487e-008 1
4 0.325 0.195122 4 0.325 0.195122
5 0.675 0.195122 5 0.675 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
4 0.325 0.195122 4 0.325 0.195122
8 0 0.195122 8 0 0.195122
7 0 0.195122 7 0 0.195122
3 0.325 0.195122 3 0.325 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
9 1 0.195122 9 1 0.195122
5 0.675 0.195122 5 0.675 0.195122
2 0.675 0.195122 2 0.675 0.195122
6 1 0.195122 6 1 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
9 1 0.195122 9 1 0.195122
13 1 1 13 1 1
5 0.675 0.195122 5 0.675 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
8 0 0.195122 8 0 0.195122
4 0.325 0.195122 4 0.325 0.195122
12 4.43487e-008 1 12 4.43487e-008 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
13 1 1 13 1 1
9 1 0.195122 9 1 0.195122
6 1 0.195122 6 1 0.195122
10 1 1 10 1 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
8 0 0.195122 8 0 0.195122
12 4.43487e-008 1 12 4.43487e-008 1
11 4.43487e-008 1 11 4.43487e-008 1
7 0 0.195122 7 0 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
13 1 1 13 1 1
10 1 1 10 1 1
@ -13931,80 +14069,80 @@ numvert 14
-0.007 0.2243 -0.13 -0.007 0.2243 -0.13
numsurf 12 numsurf 12
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
2 0.675 0.195122 2 0.675 0.195122
5 0.675 0.195122 5 0.675 0.195122
1 0.56125 0 1 0.56125 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
4 0.325 0.195122 4 0.325 0.195122
3 0.325 0.195122 3 0.325 0.195122
0 0.43875 0 0 0.43875 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
5 0.675 0.195122 5 0.675 0.195122
4 0.325 0.195122 4 0.325 0.195122
0 0.43875 0 0 0.43875 0
1 0.56125 0 1 0.56125 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
3 0.325 0.195122 3 0.325 0.195122
2 0.675 0.195122 2 0.675 0.195122
1 0.56125 0 1 0.56125 0
0 0.43875 0 0 0.43875 0
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
13 1 1 13 1 1
12 4.43487e-008 1 12 4.43487e-008 1
4 0.325 0.195122 4 0.325 0.195122
5 0.675 0.195122 5 0.675 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
4 0.325 0.195122 4 0.325 0.195122
8 0 0.195122 8 0 0.195122
7 0 0.195122 7 0 0.195122
3 0.325 0.195122 3 0.325 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
9 1 0.195122 9 1 0.195122
5 0.675 0.195122 5 0.675 0.195122
2 0.675 0.195122 2 0.675 0.195122
6 1 0.195122 6 1 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
9 1 0.195122 9 1 0.195122
13 1 1 13 1 1
5 0.675 0.195122 5 0.675 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 3 refs 3
8 0 0.195122 8 0 0.195122
4 0.325 0.195122 4 0.325 0.195122
12 4.43487e-008 1 12 4.43487e-008 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
13 1 1 13 1 1
9 1 0.195122 9 1 0.195122
6 1 0.195122 6 1 0.195122
10 1 1 10 1 1
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
8 0 0.195122 8 0 0.195122
12 4.43487e-008 1 12 4.43487e-008 1
11 4.43487e-008 1 11 4.43487e-008 1
7 0 0.195122 7 0 0.195122
SURF 0x0 SURF 0x0
mat 0 mat 4
refs 4 refs 4
13 1 1 13 1 1
10 1 1 10 1 1
@ -33198,3 +33336,49 @@ refs 4
9 0 0.5 9 0 0.5
8 0.5 0.5 8 0.5 0.5
kids 0 kids 0
OBJECT poly
name "Eng2BleedBtn2O"
loc 0.0014462 -0.12015 -0.14035
data 8
Cube.062
texture "buttons2.png"
crease 30.000000
numvert 8
-0.01 -0.0464 0.0314
-0.01 -0.0464 0.0514
-0.007 -0.0464 0.0514
-0.007 -0.0464 0.0314
-0.01 -0.0564 0.0314
-0.01 -0.0564 0.0514
-0.007 -0.0564 0.0514
-0.007 -0.0564 0.0314
numsurf 4
SURF 0x0
mat 4
refs 4
3 0.5 0.25
7 0.5 0
4 0.5 0
0 0.5 0.25
SURF 0x0
mat 4
refs 4
6 0 1.19209e-007
2 9.31321e-008 0.25
1 9.31321e-008 0.25
5 0 1.19209e-007
SURF 0x0
mat 4
refs 4
7 0.5 0
3 0.5 0.25
2 9.31321e-008 0.25
6 0 1.19209e-007
SURF 0x0
mat 4
refs 4
7 0.5 0
6 0 1.19209e-007
5 0 1.19209e-007
4 0.5 0
kids 0

View file

@ -52,7 +52,7 @@ var ADIRSreset = func {
setprop("controls/adirs/ir[2]/fault",0); setprop("controls/adirs/ir[2]/fault",0);
setprop("controls/adirs/onbat",0); setprop("controls/adirs/onbat",0);
setprop("controls/adirs/skip",0); setprop("controls/adirs/skip",0);
ADIRSinit(); adirs_init();
} }
var ir_align_loop = func(i) { var ir_align_loop = func(i) {

View file

@ -4,7 +4,6 @@ setlistener("sim/signals/fdm-initialized", func {
setprop("instrumentation/efis/mfd/pnl_mode-num", 3); setprop("instrumentation/efis/mfd/pnl_mode-num", 3);
setprop("/controls/lighting/ndl-norm", "1"); setprop("/controls/lighting/ndl-norm", "1");
setprop("/controls/lighting/ndr-norm", "1"); setprop("/controls/lighting/ndr-norm", "1");
print("EFIS ... Done!");
}); });
# Captain # Captain

View file

@ -1,14 +1,14 @@
# Electrical system for A320 by Joshua Davidson (it0uchpods/411). # Electrical system for A320 by Joshua Davidson (it0uchpods/411).
var ELEC_UPDATE_PERIOD = 0.5; # A periodic update in secs #############
var STD_VOLTS_AC = 115; # Typical volts for a power source # Init Vars #
var MIN_VOLTS_AC = 110; # Typical minimum voltage level for generic equipment #############
var STD_VOLTS_DC = 28; # Typical volts for a power source
var MIN_VOLTS_DC = 25; # Typical minimum voltage level for generic equipment var ac_volt_std = 115;
var STD_AMPS = 0; # Not used yet var ac_volt_min = 110;
var NUM_ENGINES = 2; var dc_volt_std = 28;
var dc_volt_min = 25;
# Set all the stuff I need
var elec_init = func { var elec_init = func {
setprop("/controls/switches/annun-test", 0); setprop("/controls/switches/annun-test", 0);
setprop("/controls/electrical/switches/galley", 0); setprop("/controls/electrical/switches/galley", 0);
@ -63,9 +63,13 @@ var elec_init = func {
setprop("/systems/electrical/outputs/taxi-lights", 0); setprop("/systems/electrical/outputs/taxi-lights", 0);
setprop("/systems/electrical/outputs/transponder", 0); setprop("/systems/electrical/outputs/transponder", 0);
setprop("/systems/electrical/outputs/turn-coordinator", 0); setprop("/systems/electrical/outputs/turn-coordinator", 0);
elec_timer.start();
} }
# Define all the stuff I need for the main elec loop ######################
# Main Electric Loop #
######################
var master_elec = func { var master_elec = func {
var gallery_sw = getprop("/controls/electrical/switches/galley"); var gallery_sw = getprop("/controls/electrical/switches/galley");
var idg1_sw = getprop("/controls/electrical/switches/idg1"); var idg1_sw = getprop("/controls/electrical/switches/idg1");
@ -95,7 +99,7 @@ var master_elec = func {
# Left cross tie yes? # Left cross tie yes?
if (extpwr_on and gen_ext_sw) { if (extpwr_on and gen_ext_sw) {
setprop("/controls/electrical/xtie/xtieR", 1); setprop("/controls/electrical/xtie/xtieR", 1);
} else if (rpmapu >= 99 and gen_apu_sw) { } else if (rpmapu >= 94.9 and gen_apu_sw) {
setprop("/controls/electrical/xtie/xtieR", 1); setprop("/controls/electrical/xtie/xtieR", 1);
} else if (stateL == 3 and gen1_sw) { } else if (stateL == 3 and gen1_sw) {
setprop("/controls/electrical/xtie/xtieR", 1); setprop("/controls/electrical/xtie/xtieR", 1);
@ -106,7 +110,7 @@ var master_elec = func {
# Right cross tie yes? # Right cross tie yes?
if (extpwr_on and gen_ext_sw) { if (extpwr_on and gen_ext_sw) {
setprop("/controls/electrical/xtie/xtieL", 1); setprop("/controls/electrical/xtie/xtieL", 1);
} else if (rpmapu >= 99 and gen_apu_sw) { } else if (rpmapu >= 94.9 and gen_apu_sw) {
setprop("/controls/electrical/xtie/xtieL", 1); setprop("/controls/electrical/xtie/xtieL", 1);
} else if (stateR == 3 and gen2_sw) { } else if (stateR == 3 and gen2_sw) {
setprop("/controls/electrical/xtie/xtieL", 1); setprop("/controls/electrical/xtie/xtieL", 1);
@ -116,25 +120,25 @@ var master_elec = func {
# Left AC/DC bus yes? # Left AC/DC bus yes?
if (extpwr_on and gen_ext_sw) { if (extpwr_on and gen_ext_sw) {
setprop("/systems/electrical/bus/ac1", 115); setprop("/systems/electrical/bus/ac1", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc1", 28); setprop("/systems/electrical/bus/dc1", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else if (rpmapu >= 99 and gen_apu_sw) { } else if (rpmapu >= 94.9 and gen_apu_sw) {
setprop("/systems/electrical/bus/ac1", 115); setprop("/systems/electrical/bus/ac1", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc1", 28); setprop("/systems/electrical/bus/dc1", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else if (stateL == 3 and gen1_sw) { } else if (stateL == 3 and gen1_sw) {
setprop("/systems/electrical/bus/ac1", 115); setprop("/systems/electrical/bus/ac1", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc1", 28); setprop("/systems/electrical/bus/dc1", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else if (apu_ext_crosstie_sw == 1 and xtieL) { } else if (apu_ext_crosstie_sw == 1 and xtieL) {
setprop("/systems/electrical/bus/ac1", 115); setprop("/systems/electrical/bus/ac1", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc1", 28); setprop("/systems/electrical/bus/dc1", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else { } else {
setprop("/systems/electrical/bus/ac1", 0); setprop("/systems/electrical/bus/ac1", 0);
if (getprop("/systems/electrical/bus/ac2") == 0) { if (getprop("/systems/electrical/bus/ac2") == 0) {
@ -148,25 +152,25 @@ var master_elec = func {
# Right AC/DC bus yes? # Right AC/DC bus yes?
if (extpwr_on and gen_ext_sw) { if (extpwr_on and gen_ext_sw) {
setprop("/systems/electrical/bus/ac2", 115); setprop("/systems/electrical/bus/ac2", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc2", 28); setprop("/systems/electrical/bus/dc2", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else if (rpmapu >= 99 and gen_apu_sw) { } else if (rpmapu >= 94.9 and gen_apu_sw) {
setprop("/systems/electrical/bus/ac2", 115); setprop("/systems/electrical/bus/ac2", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc2", 28); setprop("/systems/electrical/bus/dc2", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else if (stateR == 3 and gen2_sw) { } else if (stateR == 3 and gen2_sw) {
setprop("/systems/electrical/bus/ac2", 115); setprop("/systems/electrical/bus/ac2", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc2", 28); setprop("/systems/electrical/bus/dc2", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else if (apu_ext_crosstie_sw == 1 and xtieR) { } else if (apu_ext_crosstie_sw == 1 and xtieR) {
setprop("/systems/electrical/bus/ac2", 115); setprop("/systems/electrical/bus/ac2", ac_volt_std);
setprop("/systems/electrical/bus/ac-ess", 115); setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
setprop("/systems/electrical/bus/dc2", 28); setprop("/systems/electrical/bus/dc2", dc_volt_std);
setprop("/systems/electrical/bus/dc-ess", 28); setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
} else { } else {
setprop("/systems/electrical/bus/ac2", 0); setprop("/systems/electrical/bus/ac2", 0);
if (getprop("/systems/electrical/bus/ac1") == 0) { if (getprop("/systems/electrical/bus/ac1") == 0) {
@ -180,7 +184,7 @@ var master_elec = func {
if (ac_ess >= 100) { if (ac_ess >= 100) {
if (gallery_sw == 1) { if (gallery_sw == 1) {
setprop("/systems/electrical/bus/galley", 115); setprop("/systems/electrical/bus/galley", ac_volt_std);
} else if (gallery_sw == 0) { } else if (gallery_sw == 0) {
setprop("/systems/electrical/bus/galley", 0); setprop("/systems/electrical/bus/galley", 0);
} }
@ -188,22 +192,6 @@ var master_elec = func {
setprop("/systems/electrical/bus/galley", 0); setprop("/systems/electrical/bus/galley", 0);
} }
}
setlistener("/systems/electrical/bus/ac-ess", func {
if (getprop("/systems/electrical/bus/ac-ess") == 0) { if (getprop("/systems/electrical/bus/ac-ess") == 0) {
setprop("systems/electrical/on", 0); setprop("systems/electrical/on", 0);
# ai_spin.setValue(0.2); # ai_spin.setValue(0.2);
@ -240,41 +228,44 @@ setlistener("/systems/electrical/bus/ac-ess", func {
} else { } else {
setprop("systems/electrical/on", 1); setprop("systems/electrical/on", 1);
# aispin.start(); # aispin.start();
setprop("systems/electrical/outputs/adf", 28); setprop("systems/electrical/outputs/adf", dc_volt_std);
setprop("systems/electrical/outputs/audio-panel", 28); setprop("systems/electrical/outputs/audio-panel", dc_volt_std);
setprop("systems/electrical/outputs/audio-panel[1]", 28); setprop("systems/electrical/outputs/audio-panel[1]", dc_volt_std);
setprop("systems/electrical/outputs/autopilot", 28); setprop("systems/electrical/outputs/autopilot", dc_volt_std);
setprop("systems/electrical/outputs/avionics-fan", 28); setprop("systems/electrical/outputs/avionics-fan", dc_volt_std);
setprop("systems/electrical/outputs/beacon", 28); setprop("systems/electrical/outputs/beacon", dc_volt_std);
setprop("systems/electrical/outputs/bus", 28); setprop("systems/electrical/outputs/bus", dc_volt_std);
setprop("systems/electrical/outputs/cabin-lights", 28); setprop("systems/electrical/outputs/cabin-lights", dc_volt_std);
setprop("systems/electrical/outputs/dme", 28); setprop("systems/electrical/outputs/dme", dc_volt_std);
setprop("systems/electrical/outputs/efis", 28); setprop("systems/electrical/outputs/efis", dc_volt_std);
setprop("systems/electrical/outputs/flaps", 28); setprop("systems/electrical/outputs/flaps", dc_volt_std);
setprop("systems/electrical/outputs/fuel-pump", 28); setprop("systems/electrical/outputs/fuel-pump", dc_volt_std);
setprop("systems/electrical/outputs/fuel-pump[1]", 28); setprop("systems/electrical/outputs/fuel-pump[1]", dc_volt_std);
setprop("systems/electrical/outputs/gps", 28); setprop("systems/electrical/outputs/gps", dc_volt_std);
setprop("systems/electrical/outputs/gps-mfd", 28); setprop("systems/electrical/outputs/gps-mfd", dc_volt_std);
setprop("systems/electrical/outputs/hsi", 28); setprop("systems/electrical/outputs/hsi", dc_volt_std);
setprop("systems/electrical/outputs/instr-ignition-switch", 28); setprop("systems/electrical/outputs/instr-ignition-switch", dc_volt_std);
setprop("systems/electrical/outputs/instrument-lights", 28); setprop("systems/electrical/outputs/instrument-lights", dc_volt_std);
setprop("systems/electrical/outputs/landing-lights", 28); setprop("systems/electrical/outputs/landing-lights", dc_volt_std);
setprop("systems/electrical/outputs/map-lights", 28); setprop("systems/electrical/outputs/map-lights", dc_volt_std);
setprop("systems/electrical/outputs/mk-viii", 28); setprop("systems/electrical/outputs/mk-viii", dc_volt_std);
setprop("systems/electrical/outputs/nav", 28); setprop("systems/electrical/outputs/nav", dc_volt_std);
setprop("systems/electrical/outputs/nav[1]", 28); setprop("systems/electrical/outputs/nav[1]", dc_volt_std);
setprop("systems/electrical/outputs/pitot-head", 28); setprop("systems/electrical/outputs/pitot-head", dc_volt_std);
setprop("systems/electrical/outputs/stobe-lights", 28); setprop("systems/electrical/outputs/stobe-lights", dc_volt_std);
setprop("systems/electrical/outputs/tacan", 28); setprop("systems/electrical/outputs/tacan", dc_volt_std);
setprop("systems/electrical/outputs/taxi-lights", 28); setprop("systems/electrical/outputs/taxi-lights", dc_volt_std);
setprop("systems/electrical/outputs/transponder", 28); setprop("systems/electrical/outputs/transponder", dc_volt_std);
setprop("systems/electrical/outputs/turn-coordinator", 28); setprop("systems/electrical/outputs/turn-coordinator", dc_volt_std);
} }
});
var update_electrical = func {
master_elec();
settimer(update_electrical, ELEC_UPDATE_PERIOD);
} }
settimer(update_electrical, 2); ###################
# Update Function #
###################
var update_electrical = func {
master_elec();
}
var elec_timer = maketimer(0.5, update_electrical);

View file

@ -1,5 +1,8 @@
# A320Family LGCIU # A320 Hydraulics - Disabled until complete
# LGCIU
# Jonathan Redpath # Jonathan Redpath
# Note: Will be compressed
##################### #####################
# Initializing Vars # # Initializing Vars #

View file

@ -1,104 +1,106 @@
# A320 Pneumatics System
# Jonathan Redpath (legoboyvdlp) and Joshua Davidson (it0uchpods)
#############
# Init Vars #
#############
# 7th stage of HP compressor is where the bleed is normally extracted at 44 PSI +- 4 but at low N2 10th stage is selected to provide 36 +- 4 psi
var pneumatics_init = func { var pneumatics_init = func {
#Temps and Pressures. Controls ECAM indications setprop("/systems/pneumatic/tempspsi/eng1/bleedvalvepsi", 0);
setprop("/controls/bleed/BMC1/tempspsi/eng1/bleedvalvepsi",0); #eng 1 bleed pressure setprop("/systems/pneumatic/tempspsi/eng1/bleedvalvetemp", 0);
setprop("/controls/bleed/BMC1/tempspsi/eng1/bleedvalvetemp",0); #eng 2 bleed temp setprop("/systems/pneumatic/tempspsi/eng2/bleedvalvepsi", 0);
setprop("/controls/bleed/BMC1/tempspsi/eng2/bleedvalvepsi",0); #eng 1 bleed pressure setprop("/systems/pneumatic/tempspsi/eng2/bleedvalvetemp", 0);
setprop("/controls/bleed/BMC1/tempspsi/eng2/bleedvalvetemp",0); #eng 2 bleed temp setprop("/systems/pneumatic/tempspsi/eng1/downstreamfavtemp", 0);
setprop("/controls/bleed/BMC1/tempspsi/eng1/downstreamfavtemp",0); #eng 1 bleed temp upstream of precooler setprop("/systems/pneumatic/tempspsi/eng2/downstreamfavtemp", 0);
setprop("/controls/bleed/BMC1/tempspsi/eng2/downstreamfavtemp",0); #eng 2 bleed temp upstream of precooler setprop("/systems/pneumatic/valves/xbleed", 0);
#valves setprop("/systems/pneumatic/valves/eng1/bleedvalvepos", 0);
setprop("/controls/bleed/BMC1/valves/xbleed",0); #controls xbleed valve pos setprop("/systems/pneumatic/valves/eng1/OPRESSvalve", 0);
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",0); #eng 1 bleed off on startup setprop("/systems/pneumatic/valves/eng1/bleedengsrc", "7");
setprop("/controls/bleed/BMC1/valves/eng1/OPRESSvalve",0); #at 75 PSI the valve moves to 50 percent closed and at 85 psi moves to 100 percent setprop("/systems/pneumatic/valves/eng1/fav", 0);
setprop("/controls/bleed/BMC1/valves/eng1/bleedengsrc","7"); setprop("/systems/pneumatic/valves/eng2/fav", 0);
setprop("/controls/bleed/BMC1/valves/eng1/fav",0); #limits temp upstream of bleed valve to 200C. closes as needed to maintain temp. closed on startup as engine n1 is 0 setprop("/systems/pneumatic/valves/eng2/bleedvalvepos", 0);
setprop("/controls/bleed/BMC1/valves/eng2/fav",0); #limits temp upstream of bleed valve to 200C. closes as needed to maintain temp. closed on startup as engine n1 is 0 setprop("/systems/pneumatic/valves/eng2/OPRESSvalve", 0);
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",0); #eng 1 bleed off on startup setprop("/systems/pneumatic/valves/eng2/bleedengsrc", "7");
setprop("/controls/bleed/BMC1/valves/eng2/OPRESSvalve",0); setprop("/systems/pneumatic/valves/eng2/fav", 0);
setprop("/controls/bleed/BMC1/valves/eng2/bleedengsrc","7"); setprop("/systems/pneumatic/valves/apubleed", 0);
setprop("/controls/bleed/BMC1/valves/eng2/fav",0); setprop("/systems/pneumatic/valves/eng1/startvalve", 0);
setprop("/controls/bleed/BMC1/valves/apubleed",0); #apu bleed off on startup setprop("/systems/pneumatic/valves/eng2/startvalve", 0);
setprop("/controls/bleed/BMC1/valves/eng1/startvalve",0); #must be open for engine start. Opens automatically. Can get stuck (note for v.1.0) setprop("/controls/bleed/ground", 0);
setprop("/controls/bleed/BMC1/valves/eng2/startvalve",0); setprop("/controls/bleed/OHP/pack1", 0);
setprop("/controls/bleed/ground",0); #ground air disco on startup. Remember that packs must be off for this, maybe make copilot screen message like 777 autopilot messages setprop("/controls/bleed/OHP/pack2", 0);
#7th stage of HP compressor is where the bleed is normally extracted at 44 PSI +- 4 but at low N2 10th stage is selected to provide 36 +- 4 psi setprop("/controls/bleed/OHP/bleed1", 0);
#Overhead setprop("/controls/bleed/OHP/bleed2", 0);
setprop("/controls/bleed/OHP/pack1",0); setprop("/controls/bleed/OHP/xbleed", 0);
setprop("/controls/bleed/OHP/pack2",0); setprop("/controls/bleed/OHP/bleedapu", 0);
setprop("/controls/bleed/OHP/bleed1",0); setprop("/controls/bleed/OHP/ramair", 0);
setprop("/controls/bleed/OHP/bleed2",0); pneu_timer.start();
setprop("/controls/bleed/OHP/xbleed",0); #controls xbleed valve MODE
setprop("/controls/bleed/OHP/bleedapu",0);
setprop("/controls/bleed/OHP/ramair",0);
} }
#######################
# Main Pneumatic Loop #
#######################
var master_pneu = func {
##################### var bleed1 = getprop("/controls/bleed/OHP/bleed1");
# Bleed Valve Logic # var bleed2 = getprop("/controls/bleed/OHP/bleed2");
##################### var apubleedsw = getprop("/controls/bleed/OHP/bleedapu");
setlistener("/controls/bleed/OHP/bleed1", func { var apubleed = getprop("/systems/pneumatic/valves/apubleed");
var bleed1 = getprop("/controls/bleed/OHP/bleed1"); var opress1 = getprop("/systems/pneumatic/valves/eng1/OPRESSvalve");
if (bleed1) {
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",1);
} else {
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",0);
}
});
setlistener("/controls/bleed/OHP/bleed2", func {
var bleed2 = getprop("/controls/bleed/OHP/bleed2");
if (bleed2) {
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",1);
} else {
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",0);
}
});
var bleed_valve_eng1 = func { #logic that closes the bleed valve
var opress1 = getprop("/controls/bleed/BMC1/valves/eng1/OPRESSvalve");
var apubleed = getprop("/controls/bleed/BMC1/valves/apubleed");
var bleedohp1 = getprop("/controls/bleed/OHP/bleed1"); var bleedohp1 = getprop("/controls/bleed/OHP/bleed1");
var eng1valveopen = getprop("/controls/bleed/BMC1/valves/eng1/startvalve"); var eng1valveopen = getprop("/systems/pneumatic/valves/eng1/startvalve");
#if (opress1 or firepb or leak or ovht or apubleed or eng1valveopen or !bleedohp1) var opress2 = getprop("/systems/pneumatic/valves/eng2/OPRESSvalve");
if (opress1 or apubleed or !bleedoph1 or eng1valveopen) {
var bleedvalve1 = getprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos");
setprop(bleedvalve1,0);
}
}
var bleed_valve_eng2 = func { #logic that closes the bleed valve
var opress2 = getprop("/controls/bleed/BMC1/valves/eng2/OPRESSvalve");
var apubleed = getprop("/controls/bleed/BMC1/valves/apubleed");
var bleedohp2 = getprop("/controls/bleed/OHP/bleed2"); var bleedohp2 = getprop("/controls/bleed/OHP/bleed2");
var eng2valveopen = getprop("/controls/bleed/BMC1/valves/eng2/startvalve"); var eng2valveopen = getprop("/systems/pneumatic/valves/eng2/startvalve");
#if (opress2 or firepb or leak or ovht or apubleed or eng1valveopen or !bleedohp2)
if (opress2 or apubleed or !bleedoph2 or eng2valveopen) { if (bleed1) {
var bleedvalve2 = getprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos"); setprop("/systems/pneumatic/valves/eng1/bleedvalvepos", 1);
setprop(bleedvalve2,0); } else {
setprop("/systems/pneumatic/valves/eng1/bleedvalvepos", 0);
}
if (bleed2) {
setprop("/systems/pneumatic/valves/eng2/bleedvalvepos", 1);
} else {
setprop("/systems/pneumatic/valves/eng2/bleedvalvepos", 0);
}
if (opress1 or apubleed or !bleedohp1 or eng1valveopen) {
setprop("/systems/pneumatic/valves/eng1/bleedvalvepos", 0);
}
if (opress2 or apubleed or !bleedohp2 or eng2valveopen) {
setprop("/systems/pneumatic/valves/eng2/bleedvalvepos", 0);
}
if (apubleedsw) {
apubleedtimer.start();
} else {
apubleedtimer.stop();
setprop("/systems/pneumatic/valves/xbleed", 0);
setprop("/systems/pneumatic/valves/apubleed", 0);
} }
} }
setlistener("/controls/bleed/OHP/bleedapu", func { var apubleedtimer = maketimer(0.5, func {
var bleedAPU = getprop("/controls/bleed/OHP/bleedapu"); var APU = getprop("/systems/apu/rpm");
if (bleedAPU) { if (APU > 94.9) {
apubleedtimer.start(); apubleedtimer.stop();
} else { setprop("/systems/pneumatic/valves/xbleed", 1);
apubleedtimer.stop(); setprop("/systems/pneumatic/valves/eng1/bleedvalvepos", 0);
setprop("/controls/bleed/BMC1/valves/xbleed",0); #close xbleed setprop("/systems/pneumatic/valves/eng2/bleedvalvepos", 0);
setprop("/controls/bleed/BMC1/valves/apubleed",0); #close apu bleed setprop("/controls/bleed/OHP/bleed1", 0);
} setprop("/controls/bleed/OHP/bleed2", 0);
setprop("/systems/pneumatic/valves/apubleed", 1);
}
}); });
var apubleedtimer = maketimer(0.1, func { ###################
var APU = getprop("/systems/apu/rpm"); # Update Function #
if (APU > 94.9) { ###################
setprop("/controls/bleed/BMC1/valves/xbleed",1); #open xbleed so apu can supply both packs
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",0); #close eng bleeds var update_pneumatic = func {
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",0); master_pneu();
setprop("/controls/bleed/OHP/bleed1",0); #close eng bleeds on OHP
setprop("/controls/bleed/OHP/bleed2",0);
setprop("/controls/bleed/BMC1/valves/apubleed",1); #open apu bleed
apubleedtimer.stop();
} }
});
var pneu_timer = maketimer(0.5, update_pneumatic);

View file

@ -148,13 +148,9 @@ var triggerDoor = func(door, doorName, doorDesc)
setlistener("/sim/signals/fdm-initialized", func { setlistener("/sim/signals/fdm-initialized", func {
systems.elec_init(); systems.elec_init();
systems.adirs_init(); systems.adirs_init();
systems.lgciu_init();
systems.pneumatics_init(); systems.pneumatics_init();
itaf.ap_init(); itaf.ap_init();
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml"); var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml");
setprop("/controls/engines/thrust-limit", "TOGA");
setprop("/controls/engines/epr-limit", 1.301);
setprop("/controls/engines/n1-limit", 97.8);
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
}); });

View file

@ -4,6 +4,9 @@
# V1.9.1 # V1.9.1
setlistener("/sim/signals/fdm-initialized", func { setlistener("/sim/signals/fdm-initialized", func {
setprop("/controls/engines/thrust-limit", "TOGA");
setprop("/controls/engines/epr-limit", 1.301);
setprop("/controls/engines/n1-limit", 97.8);
setprop("/systems/thrust/state1", "IDLE"); setprop("/systems/thrust/state1", "IDLE");
setprop("/systems/thrust/state2", "IDLE"); setprop("/systems/thrust/state2", "IDLE");
setprop("/systems/thrust/lvrclb", "0"); setprop("/systems/thrust/lvrclb", "0");