1
0
Fork 0

autoland pulse logic rewritten

This commit is contained in:
Inuyaksa 2021-08-26 22:11:45 +02:00
parent 1b6bb9fd9b
commit 704fc63fe2
5 changed files with 33 additions and 31 deletions

View file

@ -6453,16 +6453,10 @@
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
<and>
<equals>
<property>instrumentation/pfd/lights/autoland-armed</property>
<value>1</value>
</equals>
<equals>
<property>instrumentation/pfd/lights/autoland-on</property>
<value>1</value>
</equals>
</and>
</or>
</condition>
</animation>

View file

@ -164,8 +164,8 @@ var amberFlash1 = props.globals.initNode("/instrumentation/pfd/flash-indicators/
var amberFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/amber-flash-2", 0, "BOOL");
var dhFlash = props.globals.initNode("/instrumentation/pfd/flash-indicators/dh-flash", 0, "BOOL");
var light_autoland_armed = props.globals.initNode("/instrumentation/pfd/lights/autoland-armed", 0, "BOOL");
var light_autoland_on = props.globals.initNode("/instrumentation/pfd/lights/autoland-on", 0, "BOOL");
var autoland_alarm = props.globals.initNode("/instrumentation/pfd/logic/autoland/autoland-alarm", 0, "BOOL");
var autoland_pulse = props.globals.initNode("/instrumentation/pfd/logic/autoland/autoland-sw-pulse", 0, "BOOL");
var canvas_PFD_base = {
init: func(canvas_group, file) {
@ -2967,3 +2967,21 @@ var dhTimer = maketimer(0.50, func {
dh_count = dh_count + 1;
}
});
var autolandTimer = maketimer(1.0, func {
if (autoland_pulse.getBoolValue()) {
autoland_pulse.setBoolValue(0);
} else {
autoland_pulse.setBoolValue(1);
}
});
setlistener(autoland_alarm, func(alarm) {
if (alarm.getBoolValue()) {
autoland_pulse.setBoolValue(1);
autolandTimer.start();
} else {
autolandTimer.stop();
autoland_pulse.setBoolValue(0);
}
}, 0, 0);

View file

@ -1016,7 +1016,7 @@
<path>Aircraft/A320-family/Sounds/Cockpit/calvary-charge-once.wav</path>
<condition>
<equals>
<property>/instrumentation/pfd/lights/autoland-alarm</property>
<property>/instrumentation/pfd/logic/autoland/autoland-alarm</property>
<value>1</value>
</equals>
</condition>

View file

@ -2301,7 +2301,7 @@
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-armed">
<switch name="/instrumentation/pfd/logic/autoland/autoland-armed">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
@ -2321,10 +2321,10 @@
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-alarm">
<switch name="/instrumentation/pfd/logic/autoland/autoland-alarm">
<default value="0"/>
<test logic="AND" value="1">
/instrumentation/pfd/lights/autoland-armed eq 1
/instrumentation/pfd/logic/autoland/autoland-armed eq 1
<!-- /modes/pfd/fma/pitch-mode eq "LAND" -->
/it-autoflight/output/vert eq 2
<test logic="OR">
@ -2345,11 +2345,12 @@
<default value="0"/>
<test logic="OR" value="1">
<test logic="AND">
/instrumentation/pfd/lights/autoland-alarm eq 1
/instrumentation/pfd/lights/autoland-sw-pulse eq 1
/instrumentation/pfd/logic/autoland/autoland-alarm eq 1
/instrumentation/pfd/logic/autoland/autoland-sw-pulse eq 1
</test>
<test logic="AND">
/it-autoflight/output/ap-warning eq 1
/instrumentation/pfd/logic/autoland/autoland-alarm eq 1
/it-autoflight/output/ap-warning ge 1
/ECAM/warnings/master-warning-flash eq 1
</test>
</test>

View file

@ -677,15 +677,4 @@
<max>256</max>
</filter>
<flipflop>
<type>monostable</type>
<time>
<value>1.5</value>
</time>
<S>
<property>/instrumentation/pfd/lights/autoland-armed</property>
</S>
<output>/instrumentation/pfd/lights/autoland-sw-pulse</output>
</flipflop>
</PropertyList>