A3XX: Manual Start now working

This commit is contained in:
Joshua Davidson 2017-07-03 14:26:43 -04:00
parent 718c07c430
commit 78c098d915
5 changed files with 350 additions and 2 deletions

View file

@ -99,6 +99,7 @@ var systemsReset = func {
systems.pneu_init();
systems.hyd_init();
systems.fuel_init();
systems.eng_init();
fmgc.FMGCinit();
mcdu1.MCDU_reset();
mcdu2.MCDU_reset();

View file

@ -79,8 +79,10 @@
<object-name>Eng2AntiIceBtn2O</object-name>
<object-name>Eng1BleedBtn1F</object-name>
<object-name>Eng1BleedBtn2O</object-name>
<object-name>Eng1ManStartBtn2O</object-name>
<object-name>Eng2BleedBtn1F</object-name>
<object-name>Eng2BleedBtn2O</object-name>
<object-name>Eng2ManStartBtn2O</object-name>
<object-name>FuelModeBtn1F</object-name>
<object-name>FuelModeBtn2O</object-name>
<object-name>FuelXfeedBtn1A</object-name>
@ -4322,7 +4324,214 @@
</or>
</condition>
</animation>
<!-- Manual Start -->
<animation>
<type>pick</type>
<object-name>Eng1ManStartBtn1</object-name>
<object-name>Eng1ManStartBtn2</object-name>
<object-name>Eng1ManStartBtn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<and>
<equals>
<property>/controls/OH/protectors/eng1-manstart</property>
<value>1</value>
</equals>
<or>
<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>
</and>
</condition>
<command>property-toggle</command>
<property>/controls/engines/engine[0]/man-start</property>
</binding>
<binding>
<condition>
<equals>
<property>/controls/OH/protectors/eng1-manstart</property>
<value>1</value>
</equals>
</condition>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-btn", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Eng1ManStartBtn1</object-name>
<object-name>Eng1ManStartBtn2</object-name>
<object-name>Eng1ManStartBtn2O</object-name>
<object-name>Eng1ManStartProt</object-name>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/controls/OH/protectors/eng1-manstart</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/OH/protectors/eng1-manstart</property>
<value>0</value>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-cover", 1);</script>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>Eng1ManStartProt</object-name>
<property>/controls/OH/protectors/eng1-manstart</property>
<factor>-145</factor>
<axis>
<x1-m>-0.00641</x1-m>
<y1-m>0.18647</y1-m>
<z1-m>-0.20418</z1-m>
<x2-m>-0.00353</x2-m>
<y2-m>0.20925</y2-m>
<z2-m>-0.20418</z2-m>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>Eng1ManStartBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/engines/engine[0]/man-start</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>pick</type>
<object-name>Eng2ManStartBtn1</object-name>
<object-name>Eng2ManStartBtn2</object-name>
<object-name>Eng2ManStartBtn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<and>
<equals>
<property>/controls/OH/protectors/eng2-manstart</property>
<value>1</value>
</equals>
<or>
<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>
</and>
</condition>
<command>property-toggle</command>
<property>/controls/engines/engine[1]/man-start</property>
</binding>
<binding>
<condition>
<equals>
<property>/controls/OH/protectors/eng2-manstart</property>
<value>1</value>
</equals>
</condition>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-btn", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Eng2ManStartBtn1</object-name>
<object-name>Eng2ManStartBtn2</object-name>
<object-name>Eng2ManStartBtn2O</object-name>
<object-name>Eng2ManStartProt</object-name>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/controls/OH/protectors/eng2-manstart</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/OH/protectors/eng2-manstart</property>
<value>0</value>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-cover", 1);</script>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>Eng2ManStartProt</object-name>
<property>/controls/OH/protectors/eng2-manstart</property>
<factor>-145</factor>
<axis>
<x1-m>-0.00226</x1-m>
<y1-m>0.21793</y1-m>
<z1-m>-0.20418</z1-m>
<x2-m>0.00062</x2-m>
<y2-m>0.24071</y2-m>
<z2-m>-0.20418</z2-m>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>Eng2ManStartBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/engines/engine[1]/man-start</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- Interior lights -->
<animation>
<name>Overhead panel light pick</name>

View file

@ -9,7 +9,99 @@ MATERIAL "Switch" rgb 0.678431 0.678431 0.678431 amb 0.678431 0.678431 0.678431
MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 128 trans 0
MATERIAL "DefaultWhite.002" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0.0015 0.0015 0.0015 shi 50 trans 0
OBJECT world
kids 285
kids 287
OBJECT poly
name "Eng1ManStartBtn2O"
loc 0.000119683 -5.00064e-005 -4.99785e-005
data 8
Cube.027
texture "buttons2.png"
crease 30.000000
numvert 8
-0.001687 -0.2257 -0.207197
-0.004168 -0.2257 -0.187351
-0.007144 -0.2257 -0.187723
-0.004664 -0.2257 -0.207569
-0.001687 -0.2157 -0.207197
-0.004168 -0.2157 -0.187351
-0.007144 -0.2157 -0.187723
-0.004664 -0.2157 -0.207569
numsurf 4
SURF 0x0
mat 4
refs 4
0 0.5 0.5
1 0 0.5
2 0 0.5
3 0.5 0.5
SURF 0x0
mat 4
refs 4
0 0.5 0.5
4 0.5 0.75
5 9.31321e-008 0.75
1 0 0.5
SURF 0x0
mat 4
refs 4
1 0 0.5
5 9.31321e-008 0.75
6 9.31321e-008 0.75
2 0 0.5
SURF 0x0
mat 4
refs 4
4 0.5 0.75
0 0.5 0.5
3 0.5 0.5
7 0.5 0.75
kids 0
OBJECT poly
name "Eng2ManStartBtn2O"
loc 0.000119683 -5.00064e-005 -4.99785e-005
data 8
Cube.090
texture "buttons2.png"
crease 30.000000
numvert 8
0.002245 -0.2257 -0.238652
-0.000235999 -0.2257 -0.218806
-0.003213 -0.2257 -0.219178
-0.000731999 -0.2257 -0.239024
0.002245 -0.2157 -0.238652
-0.000235999 -0.2157 -0.218806
-0.003213 -0.2157 -0.219178
-0.000731999 -0.2157 -0.239024
numsurf 4
SURF 0x0
mat 4
refs 4
0 0.5 0.5
1 0 0.5
2 0 0.5
3 0.5 0.5
SURF 0x0
mat 4
refs 4
0 0.5 0.5
4 0.5 0.75
5 9.31321e-008 0.75
1 0 0.5
SURF 0x0
mat 4
refs 4
1 0 0.5
5 9.31321e-008 0.75
6 9.31321e-008 0.75
2 0 0.5
SURF 0x0
mat 4
refs 4
4 0.5 0.75
0 0.5 0.5
3 0.5 0.5
7 0.5 0.75
kids 0
OBJECT poly
name "Eng1ManStartProt"
loc 7.05261 -5.75766 0.649317

View file

@ -32,6 +32,11 @@ setprop("/systems/apu/egt", 42);
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
var eng_init = func {
setprop("/controls/engines/engine[0]/man-start", 0);
setprop("/controls/engines/engine[1]/man-start", 0);
}
##############################
# Trigger Startups and Stops #
##############################
@ -45,6 +50,7 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
eng_one_man_startt.start();
}
} else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
setprop("/controls/engines/engine[0]/man-start", 0);
setprop("/systems/pneumatic/eng1-starter", 0);
setprop("/controls/engines/engine[0]/starter", 0);
setprop("/controls/engines/engine[0]/cutoff", 1);
@ -54,6 +60,24 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
}
});
setlistener("/controls/engines/engine[0]/man-start", func {
start_one_mancheck();
});
var start_one_mancheck = func {
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
setprop("/engines/engine[0]/state", 1);
setprop("/controls/engines/engine[0]/starter", 1);
}
} else {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
setprop("/engines/engine[0]/state", 0);
setprop("/controls/engines/engine[0]/starter", 0);
}
}
}
var start_one_check = func {
settimer(start_one_check_b, 0.3);
}
@ -73,6 +97,7 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
eng_two_man_startt.start();
}
} else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
setprop("/controls/engines/engine[1]/man-start", 0);
setprop("/systems/pneumatic/eng2-starter", 0);
setprop("/controls/engines/engine[1]/starter", 0);
setprop("/controls/engines/engine[1]/cutoff", 1);
@ -81,6 +106,24 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
}
});
setlistener("/controls/engines/engine[1]/man-start", func {
start_two_mancheck();
});
var start_two_mancheck = func {
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
setprop("/engines/engine[1]/state", 1);
setprop("/controls/engines/engine[1]/starter", 1);
}
} else {
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
setprop("/engines/engine[1]/state", 0);
setprop("/controls/engines/engine[1]/starter", 0);
}
}
}
var start_two_check = func {
settimer(start_two_check_b, 0.3);
}
@ -215,9 +258,11 @@ var apu_stop = func {
setlistener("/controls/engines/engine-start-switch", func {
if (getprop("/engines/engine[0]/state") == 0) {
start_one_check();
start_one_mancheck();
}
if (getprop("/engines/engine[1]/state") == 0) {
start_two_check();
start_two_mancheck();
}
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {

View file

@ -186,6 +186,7 @@ setlistener("/sim/signals/fdm-initialized", func {
systems.pneu_init();
systems.hyd_init();
systems.fuel_init();
systems.eng_init();
fmgc.APinit();
librariesLoop.start();
fmgc.FMGCinit();