1
0
Fork 0

Merge pull request #253 from inuyaksa/rework

Autoland
This commit is contained in:
legoboyvdlp 2021-09-16 12:18:54 +01:00 committed by GitHub
commit e94ca8d903
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 88 additions and 30 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>
<equals>
<property>instrumentation/pfd/lights/autoland-on</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>

View file

@ -164,8 +164,9 @@ 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 autoland_pitch_land = props.globals.initNode("/instrumentation/pfd/logic/autoland/pitch-land", 0, "BOOL");
var canvas_PFD_base = {
init: func(canvas_group, file) {
@ -2967,3 +2968,29 @@ var dhTimer = maketimer(0.50, func {
dh_count = dh_count + 1;
}
});
var autolandTimer = maketimer(0.5, 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);
setlistener(pitch_mode, func(pitch) {
if (pitch.getValue() == "LAND") {
autoland_pitch_land.setBoolValue(1);
} else {
autoland_pitch_land.setBoolValue(0);
}
},0,0);

View file

@ -1009,6 +1009,22 @@
<factor>40.0</factor>
</volume>
</apoff>
<autolandwarning>
<name>autolandwarning-single</name>
<mode>once</mode>
<path>Aircraft/A320-family/Sounds/Cockpit/calvary-charge-once.wav</path>
<condition>
<equals>
<property>/instrumentation/pfd/logic/autoland/autoland-alarm</property>
<value>1</value>
</equals>
</condition>
<volume>
<property>/sim/current-view/internal</property>
<factor>40.0</factor>
</volume>
</autolandwarning>
<gear>
<name>gear0</name>

View file

@ -2301,26 +2301,32 @@
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-armed">
<default value="0"/>
<test logic="OR" value="1">
<!-- /gear/gear[0]/wow eq 0 -->
<test logic="AND">
/modes/pfd/ILS1 eq 1
/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected le 200
</test>
<test logic="AND">
/modes/pfd/ILS2 eq 1
/instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected le 200
</test>
<!-- /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected le 200 -->
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-on">
<switch name="/instrumentation/pfd/logic/autoland/autoland-armed">
<default value="0"/>
<test logic="AND" value="1">
/instrumentation/pfd/lights/autoland-armed eq 1
<test logic="OR">
/systems/electrical/bus/ac-2 ge 110
/systems/electrical/bus/ac-ess-shed ge 110
</test>
<test logic="OR">
<test logic="AND">
/modes/pfd/ILS1 eq 1
/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 200
</test>
<test logic="AND">
/modes/pfd/ILS2 eq 1
/instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 200
</test>
</test>
</test>
</switch>
<switch name="/instrumentation/pfd/logic/autoland/autoland-alarm">
<default value="0"/>
<test logic="AND" value="1">
/instrumentation/pfd/logic/autoland/autoland-armed eq 1
<!-- /modes/pfd/fma/pitch-mode eq "LAND" -->
/instrumentation/pfd/logic/autoland/pitch-land eq 1
<test logic="OR">
<test logic="AND">
/it-autoflight/output/ap1 eq 0
@ -2335,6 +2341,21 @@
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-on">
<default value="0"/>
<test logic="OR" value="1">
<test logic="AND">
/instrumentation/pfd/logic/autoland/autoland-alarm eq 1
/instrumentation/pfd/logic/autoland/autoland-sw-pulse eq 1
</test>
<test logic="AND">
/instrumentation/pfd/logic/autoland/autoland-alarm eq 1
/it-autoflight/output/ap-warning ge 1
/ECAM/warnings/master-warning-flash eq 1
</test>
</test>
</switch>
</channel>
<channel name="ENG" execrate="16">