1
0
Fork 0

Merge pull request #95 from legoboyvdlp/altitude-alert

Altitude alert
This commit is contained in:
Jonathan Redpath 2020-03-18 16:03:34 +00:00 committed by GitHub
commit 464e90abf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 4482 additions and 4135 deletions

View file

@ -190,13 +190,13 @@ setlistener("/sim/signals/fdm-initialized", func {
writeSettings();
if (getprop("options/system/save-state") == 1)
{
save.restore(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml");
save.restore(save.default, getprop("sim/fg-home") ~ "/Export/" ~ getprop("sim/aircraft") ~ "-save.xml");
}
spinning.stop();
});
setlistener("/sim/signals/exit", func {
save.save(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml");
save.save(save.default, getprop("sim/fg-home") ~ "/Export/" ~ getprop("sim/aircraft") ~ "-save.xml");
});
var renderingSettings = {

View file

@ -5307,6 +5307,10 @@
</condition>
<command>nasal</command>
<script>
if (getprop("sim/sound/warnings/cchord")) {
setprop("sim/sound/warnings/cchord-inhibit", 1);
}
if (getprop("it-autoflight/output/ap-warning") == 1) {
setprop("it-autoflight/output/ap-warning", 0);
}

View file

@ -169,6 +169,8 @@ var ilsFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/il
var qnhFlash = props.globals.initNode("/instrumentation/pfd/flash-indicators/qnh-flash", 0, "BOOL");
var altFlash1 = props.globals.initNode("/instrumentation/pfd/flash-indicators/alt-flash-1", 0, "BOOL");
var altFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/alt-flash-2", 0, "BOOL");
var amberFlash1 = props.globals.initNode("/instrumentation/pfd/flash-indicators/amber-flash-1", 0, "BOOL");
var amberFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/amber-flash-2", 0, "BOOL");
var canvas_PFD_base = {
init: func(canvas_group, file) {
@ -217,8 +219,8 @@ var canvas_PFD_base = {
return ["FMA_man","FMA_manmode","FMA_flxtemp","FMA_thrust","FMA_lvrclb","FMA_pitch","FMA_pitcharm","FMA_pitcharm2","FMA_roll","FMA_rollarm","FMA_combined","FMA_ctr_msg","FMA_catmode","FMA_cattype","FMA_nodh","FMA_dh","FMA_dhn","FMA_ap","FMA_fd","FMA_athr",
"FMA_man_box","FMA_flx_box","FMA_thrust_box","FMA_pitch_box","FMA_pitcharm_box","FMA_roll_box","FMA_rollarm_box","FMA_combined_box","FMA_catmode_box","FMA_cattype_box","FMA_cat_box","FMA_dh_box","FMA_ap_box","FMA_fd_box","FMA_athr_box","FMA_Middle1",
"FMA_Middle2","ASI_max","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_trend_up","ASI_trend_down","ASI_digit_UP","ASI_digit_DN","ASI_decimal_UP","ASI_decimal_DN","ASI_index","ASI_error","ASI_group","ASI_frame","AI_center","AI_bank",
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash", "ALT_scale","ALT_target",
"ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP","ALT_digit_DN","ALT_error","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting",
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber",
"ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP","ALT_digit_DN","ALT_error","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting",
"QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame",
"TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","flap_max","clean_speed"];
},
@ -1434,6 +1436,7 @@ var canvas_PFD_1 = {
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["ALT_group"].show();
me["ALT_box"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
@ -1500,24 +1503,50 @@ var canvas_PFD_1 = {
me["ALT_target"].hide();
}
alt_target_diff = target_altitude.getValue() - altitude.getValue();
if ((FMGCphase.getValue() == '2' and alt_target_diff < 750 and alt_target_diff > 200) or (FMGCphase.getValue() == '4' and alt_target_diff > -750 and alt_target_diff < -200)) {
if (alt_going1 == 0) {
alt_going1 = 1;
}
if (alt_going1 == 1) {
altTimer1.start();
if (!getprop("ECAM/alt-alert-flash") and !getprop("ECAM/alt-alert-steady")) {
alt_going1 = 0;
amber_going1 = 0;
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
} else {
if (getprop("ECAM/alt-alert-flash")) {
if (alt_going1 == 1) {
me["ALT_box_flash"].hide();
altTimer1.stop();
}
if (amber_going1 == 0) {
amber_going1 = 1;
}
if (amber_going1 == 1) {
me["ALT_box_amber"].show();
me["ALT_box"].hide();
amberTimer1.start();
}
if (amberFlash1.getValue() == 1) {
me["ALT_box_amber"].hide();
} else {
me["ALT_box_amber"].show();
}
} elsif (getprop("ECAM/alt-alert-steady")) {
if (amber_going1 == 1) {
me["ALT_box"].show();
me["ALT_box_amber"].hide();
amberTimer1.stop();
}
if (alt_going1 == 0) {
alt_going1 = 1;
}
if (alt_going1 == 1) {
me["ALT_box_flash"].show();
altTimer1.start();
}
if (altFlash1.getValue() == 1) {
me["ALT_box_flash"].show();
} else {
me["ALT_box_flash"].hide();
}
}
} else {
altTimer1.stop();
alt_going1 = 0;
me["ALT_box_flash"].hide();
}
}
} else {
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
@ -1525,6 +1554,8 @@ var canvas_PFD_1 = {
me["ALT_group2"].hide();
me["ALT_scale"].hide();
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
me["ALT_box"].hide();
}
me.updateCommonFast();
@ -2050,6 +2081,7 @@ var canvas_PFD_2 = {
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["ALT_group"].show();
me["ALT_box"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
@ -2116,25 +2148,50 @@ var canvas_PFD_2 = {
me["ALT_target"].hide();
}
alt_target_diff = target_altitude.getValue() - altitude.getValue();
if ((FMGCphase.getValue() == '2' and alt_target_diff < 750 and alt_target_diff > 200) or (FMGCphase.getValue() == '4' and alt_target_diff > -750 and alt_target_diff < -200)) {
if (alt_going2 == 0) {
alt_going2 = 1;
}
if (alt_going2 == 1) {
altTimer2.start();
if (!getprop("ECAM/alt-alert-flash") and !getprop("ECAM/alt-alert-steady")) {
alt_going2 = 0;
amber_going2 = 0;
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
} else {
if (getprop("ECAM/alt-alert-flash")) {
if (alt_going2 == 1) {
me["ALT_box_flash"].hide();
altTimer2.stop();
}
if (amber_going2 == 0) {
amber_going2 = 1;
}
if (amber_going2 == 1) {
me["ALT_box_amber"].show();
me["ALT_box"].hide();
amberTimer2.start();
}
if (amberFlash2.getValue() == 1) {
me["ALT_box_amber"].show();
} else {
me["ALT_box_amber"].hide();
}
} elsif (getprop("ECAM/alt-alert-steady")) {
if (amber_going2 == 1) {
me["ALT_box"].show();
me["ALT_box_amber"].hide();
amberTimer2.stop();
}
if (alt_going2 == 0) {
alt_going2 = 1;
}
if (alt_going2 == 1) {
me["ALT_box_flash"].show();
altTimer2.start();
}
if (altFlash2.getValue() == 1) {
me["ALT_box_flash"].show();
} else {
me["ALT_box_flash"].hide();
}
}
} else {
altTimer2.stop();
alt_going2 = 0;
me["ALT_box_flash"].hide();
}
} else {
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
@ -2142,6 +2199,8 @@ var canvas_PFD_2 = {
me["ALT_group2"].hide();
me["ALT_scale"].hide();
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
me["ALT_box"].hide();
}
me.updateCommonFast();
@ -2425,3 +2484,21 @@ var altTimer2 = maketimer(0.50, func {
}
});
var amber_going1 = 0;
var amberTimer1 = maketimer(0.50, func {
if (!amberFlash1.getBoolValue()) {
amberFlash1.setBoolValue(1);
} else {
amberFlash1.setBoolValue(0);
}
});
var amber_going2 = 0;
var amberTimer2 = maketimer(0.50, func {
if (!amberFlash2.getBoolValue()) {
amberFlash2.setBoolValue(1);
} else {
amberFlash2.setBoolValue(0);
}
});

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 291 KiB

After

Width:  |  Height:  |  Size: 293 KiB

View file

@ -32,6 +32,10 @@ var gear_agl_cur = nil;
var numberMinutes = nil;
var timeNow = nil;
var timer10secIRS = nil;
var altAlertInhibit = nil;
var alt200 = nil;
var alt750 = nil;
var bigThree = nil;
var messages_priority_3 = func {
phaseVar = phaseNode.getValue();
@ -744,6 +748,84 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(ap_offw);
}
# C-Chord
if ((pts.Modes.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-1-capt")) < 200) or !pts.Modes.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 200) {
alt200 = 1;
} else {
alt200 = 0;
}
if ((pts.Modes.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-1-capt")) < 750) or !pts.Modes.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 750) {
alt750 = 1;
} else {
alt750 = 0;
}
if (FWC.altChg.getValue() or pts.Gear.position[0].getValue() == 1 or (getprop("controls/gear/gear-down") and pts.JSBSIM.FCS.slatDeg.getValue() > 4) or fmgc.Output.vert.getValue() == 2) {
altAlertInhibit = 1;
} else {
altAlertInhibit = 0;
}
if (alt750 and !alt200 and !altAlertInhibit) {
FWC.Monostable.altAlert2.setValue(1);
} else {
FWC.Monostable.altAlert2.setValue(0);
}
if ((!fcu.ap1.getBoolValue() and !fcu.ap2.getBoolValue()) and FWC.Monostable.altAlert2.getValue()) {
FWC.Monostable.altAlert1.setValue(1);
} else {
FWC.Monostable.altAlert1.setValue(0);
}
if (alt750 and alt200 and !altAlertInhibit) {
setprop("ECAM/flipflop/alt-alert-2-rs-set", 1);
} else {
setprop("ECAM/flipflop/alt-alert-2-rs-set", 0);
}
if (getprop("ECAM/flipflop/alt-alert-rs-reset") or (!alt750 and !alt200 and !altAlertInhibit)) {
setprop("ECAM/flipflop/alt-alert-2-rs-reset", 1);
} else {
setprop("ECAM/flipflop/alt-alert-2-rs-reset", 0);
}
if (alt750 and !alt200 and !altAlertInhibit and getprop("ECAM/flipflop/alt-alert-2-rs-output")) {
setprop("ECAM/flipflop/alt-alert-3-rs-set", 1);
} else {
setprop("ECAM/flipflop/alt-alert-3-rs-set", 0);
}
if ((!alt750 and !alt200 and !altAlertInhibit and getprop("ECAM/flipflop/alt-alert-rs-output")) or (!alt750 and !alt200 and !altAlertInhibit and getprop("ECAM/flipflop/alt-alert-3-rs-output")) or getprop("ECAM/flipflop/alt-alert-3-rs-set")) {
bigThree = 1;
} else {
bigThree = 0;
}
if (!gnd and (FWC.Monostable.altAlert1Output.getValue() or bigThree)) {
if (!getprop("sim/sound/warnings/cchord-inhibit")) {
setprop("sim/sound/warnings/cchord", 1);
} else {
setprop("sim/sound/warnings/cchord", 0);
}
} else {
setprop("sim/sound/warnings/cchord", 0);
setprop("sim/sound/warnings/cchord-inhibit", 0);
}
if (!gnd and getprop("ECAM/flipflop/alt-alert-3-rs-set") != 1 and alt750 and !alt200 and !altAlertInhibit) {
setprop("ECAM/alt-alert-steady", 1);
} else {
setprop("ECAM/alt-alert-steady", 0);
}
if (!gnd and bigThree) {
setprop("ECAM/alt-alert-flash", 1);
} else {
setprop("ECAM/alt-alert-flash", 0);
}
if (!systems.cargoTestBtn.getBoolValue()) {
if (cargoSmokeFwd.clearFlag == 0 and systems.fwdCargoFireWarn.getBoolValue() and (phaseVar <= 3 or phaseVar >= 9 or phaseVar == 6)) {
cargoSmokeFwd.active = 1;

View file

@ -22,51 +22,55 @@ var gear_agl_cur = nil;
var FWC = {
Btn: {
clr: props.globals.initNode("/ECAM/buttons/clear-btn", 0, "BOOL"),
recall: props.globals.initNode("/ECAM/buttons/recall-btn", 0, "BOOL"),
recallStsNormal: props.globals.initNode("/ECAM/buttons/recall-status-normal", 0, "BOOL"),
recallStsNormalOutput: props.globals.initNode("/ECAM/buttons/recall-status-normal-output", 0, "BOOL"),
clr: props.globals.initNode("ECAM/buttons/clear-btn", 0, "BOOL"),
recall: props.globals.initNode("ECAM/buttons/recall-btn", 0, "BOOL"),
recallStsNormal: props.globals.initNode("ECAM/buttons/recall-status-normal", 0, "BOOL"),
recallStsNormalOutput: props.globals.initNode("ECAM/buttons/recall-status-normal-output", 0, "BOOL"),
},
Monostable: {
phase1: props.globals.initNode("/ECAM/phases/monostable/phase-1-300", 0, "BOOL"),
phase5: props.globals.initNode("/ECAM/phases/monostable/phase-5", 0, "BOOL"),
phase7: props.globals.initNode("/ECAM/phases/monostable/phase-7", 0, "BOOL"),
phase9: props.globals.initNode("/ECAM/phases/monostable/phase-9", 0, "BOOL"),
phase1Output: props.globals.initNode("/ECAM/phases/monostable/phase-1-output"),
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
phase1: props.globals.initNode("ECAM/phases/monostable/phase-1-300", 0, "BOOL"),
phase5: props.globals.initNode("ECAM/phases/monostable/phase-5", 0, "BOOL"),
phase7: props.globals.initNode("ECAM/phases/monostable/phase-7", 0, "BOOL"),
phase9: props.globals.initNode("ECAM/phases/monostable/phase-9", 0, "BOOL"),
phase1Output: props.globals.initNode("ECAM/phases/monostable/phase-1-output"),
phase5Output: props.globals.initNode("ECAM/phases/monostable/phase-5-output"),
phase7Output: props.globals.initNode("ECAM/phases/monostable/phase-7-output"),
phase9Output: props.globals.initNode("ECAM/phases/monostable/phase-9-output"),
toPowerOutput: props.globals.getNode("ECAM/phases/monostable/to-power-set-output"),
m80kt: props.globals.getNode("ECAM/phases/monostable-80kt"),
altAlert1: props.globals.initNode("ECAM/altitude-alert-monostable-set", 0, "BOOL"),
altAlert1Output: props.globals.initNode("ECAM/altitude-alert-monostable-output"),
altAlert2: props.globals.initNode("ECAM/flipflop/altitude-alert-rs-set", 0, "BOOL"),
},
Flipflop: {
gearSet: props.globals.initNode("/ECAM/phases/flipflop/gear-set", 0, "BOOL"),
gearReset: props.globals.initNode("/ECAM/phases/flipflop/gear-reset", 0, "BOOL"),
gearOutput: props.globals.initNode("/ECAM/phases/flipflop/gear-output", 0, "BOOL"),
phase2Set: props.globals.initNode("/ECAM/phases/flipflop/phase-2-set", 0, "BOOL"),
phase2Reset: props.globals.initNode("/ECAM/phases/flipflop/phase-2-reset", 0, "BOOL"),
phase2Output: props.globals.initNode("/ECAM/phases/flipflop/phase-2-output", 0, "BOOL"),
phase10Set: props.globals.initNode("/ECAM/phases/flipflop/phase-10-set", 0, "BOOL"),
phase10Reset: props.globals.initNode("/ECAM/phases/flipflop/phase-10-reset", 0, "BOOL"),
phase10Output: props.globals.initNode("/ECAM/phases/flipflop/phase-10-output", 0, "BOOL"),
recallSet: props.globals.initNode("/ECAM/flipflop/recall-set", 0, "BOOL"),
recallReset: props.globals.initNode("/ECAM/flipflop/recall-reset", 0, "BOOL"),
recallOutput: props.globals.initNode("/ECAM/flipflop/recall-output", 0, "BOOL"),
gearSet: props.globals.initNode("ECAM/phases/flipflop/gear-set", 0, "BOOL"),
gearReset: props.globals.initNode("ECAM/phases/flipflop/gear-reset", 0, "BOOL"),
gearOutput: props.globals.initNode("ECAM/phases/flipflop/gear-output", 0, "BOOL"),
phase2Set: props.globals.initNode("ECAM/phases/flipflop/phase-2-set", 0, "BOOL"),
phase2Reset: props.globals.initNode("ECAM/phases/flipflop/phase-2-reset", 0, "BOOL"),
phase2Output: props.globals.initNode("ECAM/phases/flipflop/phase-2-output", 0, "BOOL"),
phase10Set: props.globals.initNode("ECAM/phases/flipflop/phase-10-set", 0, "BOOL"),
phase10Reset: props.globals.initNode("ECAM/phases/flipflop/phase-10-reset", 0, "BOOL"),
phase10Output: props.globals.initNode("ECAM/phases/flipflop/phase-10-output", 0, "BOOL"),
recallSet: props.globals.initNode("ECAM/flipflop/recall-set", 0, "BOOL"),
recallReset: props.globals.initNode("ECAM/flipflop/recall-reset", 0, "BOOL"),
recallOutput: props.globals.initNode("ECAM/flipflop/recall-output", 0, "BOOL"),
},
Timer: {
eng1idle: props.globals.initNode("/ECAM/phases/timer/eng1idle", 0, "INT"),
eng2idle: props.globals.initNode("/ECAM/phases/timer/eng2idle", 0, "INT"),
eng1or2: props.globals.initNode("/ECAM/phases/timer/eng1or2", 0, "INT"),
toInhibit: props.globals.initNode("/ECAM/phases/timer/to-inhibit", 0, "INT"),
ldgInhibit: props.globals.initNode("/ECAM/phases/timer/ldg-inhibit", 0, "INT"),
eng1idle: props.globals.initNode("ECAM/phases/timer/eng1idle", 0, "INT"),
eng2idle: props.globals.initNode("ECAM/phases/timer/eng2idle", 0, "INT"),
eng1or2: props.globals.initNode("ECAM/phases/timer/eng1or2", 0, "INT"),
toInhibit: props.globals.initNode("ECAM/phases/timer/to-inhibit", 0, "INT"),
ldgInhibit: props.globals.initNode("ECAM/phases/timer/ldg-inhibit", 0, "INT"),
eng1idleOutput: props.globals.getNode("ECAM/phases/timer/eng1idle-output"),
eng2idleOutput: props.globals.getNode("ECAM/phases/timer/eng2idle-output"),
eng1or2Output: props.globals.initNode("/ECAM/phases/timer/eng1or2-output", 0, "INT"),
eng1or2Output: props.globals.initNode("ECAM/phases/timer/eng1or2-output", 0, "INT"),
toInhibitOutput: props.globals.getNode("ECAM/phases/timer/to-inhibit-output"),
ldgInhibitOutput: props.globals.getNode("ECAM/phases/timer/ldg-inhibit-output"),
},
speed80: props.globals.initNode("/ECAM/phases/speed-gt-80", 0, "BOOL"),
toPower: props.globals.initNode("/ECAM/phases/to-power-set", 0, "BOOL"),
speed80: props.globals.initNode("ECAM/phases/speed-gt-80", 0, "BOOL"),
toPower: props.globals.initNode("ECAM/phases/to-power-set", 0, "BOOL"),
altChg: props.globals.getNode("it-autoflight/input/alt-is-changing", 1),
};
var phaseLoop = func() {

View file

@ -102,6 +102,12 @@ var JSBSim = {
},
};
var Modes = {
Altimeter: {
std: props.globals.getNode("modes/altimeter/std"),
},
};
var Options = {
eng: props.globals.getNode("options/eng"),
};

View file

@ -1593,23 +1593,23 @@
</condition>
<volume>
<property>/sim/current-view/internal</property>
<factor>0.2</factor>
<factor>0.4</factor>
</volume>
<reference-dist>10</reference-dist>
<max-dist>100</max-dist>
</cricket>
<cchord>
<name>Cricket</name>
<name>C-chord</name>
<path>Aircraft/A320-family/Sounds/Cockpit/c-chord.wav</path>
<mode>once</mode>
<mode>looped</mode>
<type>avionics</type>
<condition>
<property>/sim/sound/warnings/cchord</property>
</condition>
<volume>
<property>/sim/current-view/internal</property>
<factor>0.2</factor>
<factor>0.6</factor>
</volume>
<reference-dist>10</reference-dist>
<max-dist>100</max-dist>

Binary file not shown.

Binary file not shown.

View file

@ -83,89 +83,89 @@
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/to-config-set</property>
<property>ECAM/to-config-set</property>
</S>
<R>
<property>/ECAM/to-config-reset</property>
<property>ECAM/to-config-reset</property>
</R>
<output>/ECAM/to-config-flipflop</output>
<output>ECAM/to-config-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/to-memo-set</property>
<property>ECAM/to-memo-set</property>
</S>
<R>
<property>/ECAM/to-memo-reset</property>
<property>ECAM/to-memo-reset</property>
</R>
<output>/ECAM/to-memo-flipflop</output>
<output>ECAM/to-memo-flipflop</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/ldg-memo-set</property>
<property>ECAM/ldg-memo-set</property>
</S>
<R>
<property>/ECAM/ldg-memo-reset</property>
<property>ECAM/ldg-memo-reset</property>
</R>
<output>/ECAM/ldg-memo-flipflop</output>
<output>ECAM/ldg-memo-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/ldg-memo-2200-set</property>
<property>ECAM/ldg-memo-2200-set</property>
</S>
<R>
<property>/ECAM/ldg-memo-2200-reset</property>
<property>ECAM/ldg-memo-2200-reset</property>
</R>
<output>/ECAM/ldg-memo-2200-flipflop</output>
<output>ECAM/ldg-memo-2200-flipflop</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/phases/flipflop/gear-set</property>
<property>ECAM/phases/flipflop/gear-set</property>
</S>
<R>
<property>/ECAM/phases/flipflop/gear-reset</property>
<property>ECAM/phases/flipflop/gear-reset</property>
</R>
<output>/ECAM/phases/flipflop/gear-output</output>
<output>ECAM/phases/flipflop/gear-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/phases/flipflop/phase-2-set</property>
<property>ECAM/phases/flipflop/phase-2-set</property>
</S>
<R>
<property>/ECAM/phases/flipflop/phase-2-reset</property>
<property>ECAM/phases/flipflop/phase-2-reset</property>
</R>
<output>/ECAM/phases/flipflop/phase-2-output</output>
<output>ECAM/phases/flipflop/phase-2-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/phases/flipflop/phase-10-set</property>
<property>ECAM/phases/flipflop/phase-10-set</property>
</S>
<R>
<property>/ECAM/phases/flipflop/phase-10-reset</property>
<property>ECAM/phases/flipflop/phase-10-reset</property>
</R>
<output>/ECAM/phases/flipflop/phase-10-output</output>
<output>ECAM/phases/flipflop/phase-10-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/flipflop/recall-set</property>
<property>ECAM/flipflop/recall-set</property>
</S>
<R>
<property>/ECAM/flipflop/recall-reset</property>
<property>ECAM/flipflop/recall-reset</property>
</R>
<output>/ECAM/flipflop/recall-output</output>
<output>ECAM/flipflop/recall-output</output>
</flipflop>
<flipflop>
@ -175,10 +175,10 @@
</time>
<S>
<not>
<property>/ECAM/phases/speed-gt-80</property>
<property>ECAM/phases/speed-gt-80</property>
</not>
</S>
<output>/ECAM/phases/monostable-80kt</output>
<output>ECAM/phases/monostable-80kt</output>
</flipflop>
<flipflop>
@ -187,9 +187,9 @@
<value>300.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-1-300</property>
<property>ECAM/phases/monostable/phase-1-300</property>
</S>
<output>/ECAM/phases/monostable/phase-1-output</output>
<output>ECAM/phases/monostable/phase-1-output</output>
</flipflop>
<flipflop>
@ -198,9 +198,9 @@
<value>120.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-5</property>
<property>ECAM/phases/monostable/phase-5</property>
</S>
<output>/ECAM/phases/monostable/phase-5-output</output>
<output>ECAM/phases/monostable/phase-5-output</output>
</flipflop>
<flipflop>
@ -209,9 +209,9 @@
<value>180.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-7</property>
<property>ECAM/phases/monostable/phase-7</property>
</S>
<output>/ECAM/phases/monostable/phase-7-output</output>
<output>ECAM/phases/monostable/phase-7-output</output>
</flipflop>
<flipflop>
@ -220,12 +220,159 @@
<value>5.0</value>
</time>
<S>
<property>/ECAM/buttons/recall-status-normal</property>
<property>ECAM/buttons/recall-status-normal</property>
</S>
<R>
<property>/ECAM/buttons/clear-btn</property>
<property>ECAM/buttons/clear-btn</property>
</R>
<output>/ECAM/buttons/recall-status-normal-output</output>
<output>ECAM/buttons/recall-status-normal-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>ECAM/altitude-alert-monostable-set</property>
</S>
<R>
<property>ECAM/altitude-alert-monostable-intermediate-output</property>
</R>
<output>ECAM/altitude-alert-monostable-flipflop-intermediate</output>
</flipflop>
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
<time>
<value>1.5</value>
</time>
<S>
<not><property>ECAM/altitude-alert-monostable-flipflop-intermediate</property></not>
</S>
<output>ECAM/altitude-alert-monostable-intermediate-output</output>
</flipflop>
<filter>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<and>
<property>ECAM/altitude-alert-monostable-flipflop-intermediate</property>
<not><property>ECAM/altitude-alert-monostable-intermediate-output</property></not>
</and>
</condition>
<value>1</value>
</input>
<output>ECAM/altitude-alert-monostable-output</output>
</filter>
<filter>
<type>derivative</type>
<input>it-autoflight/input/alt</input>
<output>it-autoflight/input/alt-is-changing</output>
<filter-time>1.0</filter-time>
</filter>
<flipflop>
<type>monostable</type>
<time>
<value>1</value>
</time>
<S>
<property>it-autoflight/input/alt-is-changing</property>
</S>
<output>ECAM/alt-is-changing</output>
</flipflop>
<filter>
<input>
<condition>
<equals>
<property>gear/gear[0]/position-norm</property>
<value>1</value>
</equals>
</condition>
<value>1</value>
</input>
<input>
<condition>
<not-equals>
<property>gear/gear[0]/position-norm</property>
<value>1</value>
</not-equals>
</condition>
<value>0</value>
</input>
<output>ECAM/gear-downlocked-set</output>
</filter>
<flipflop>
<type>monostable</type>
<time>
<value>1</value>
</time>
<S>
<property>ECAM/gear-downlocked-set</property>
</S>
<output>ECAM/gear-downlocked-output</output>
</flipflop>
<filter>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<or>
<equals><property>ECAM/gear-downlocked-output</property><value>1</value></equals>
<equals><property>ECAM/alt-is-changing</property><value>1</value></equals>
</or>
</condition>
<value>1</value>
</input>
<input>
<condition>
<and>
<equals><property>ECAM/gear-downlocked-output</property><value>0</value></equals>
<equals><property>ECAM/alt-is-changing</property><value>0</value></equals>
</and>
</condition>
<value>0</value>
</input>
<output>ECAM/flipflop/alt-alert-rs-reset</output>
</filter>
<flipflop>
<type>RS</type>
<S>
<property>ECAM/flipflop/altitude-alert-rs-set</property>
</S>
<R>
<property>ECAM/flipflop/alt-alert-rs-reset</property>
</R>
<output>ECAM/flipflop/alt-alert-rs-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>ECAM/flipflop/alt-alert-2-rs-set</property>
</S>
<R>
<property>ECAM/flipflop/alt-alert-2-rs-reset</property>
</R>
<output>ECAM/flipflop/alt-alert-2-rs-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>ECAM/flipflop/alt-alert-3-rs-set</property>
</S>
<R>
<property>ECAM/flipflop/alt-alert-rs-reset</property>
</R>
<output>ECAM/flipflop/alt-alert-3-rs-output</output>
</flipflop>
<!-- falling edge detector - take inverse of following -->
@ -236,9 +383,9 @@
<value>3.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-9</property>
<property>ECAM/phases/monostable/phase-9</property>
</S>
<output>/ECAM/phases/monostable/phase-9-output</output>
<output>ECAM/phases/monostable/phase-9-output</output>
</flipflop>
<flipflop>
@ -248,9 +395,9 @@
<value>1.0</value>
</time>
<S>
<property>/ECAM/phases/to-power-set</property>
<property>ECAM/phases/to-power-set</property>
</S>
<output>/ECAM/phases/monostable/to-power-set-output</output>
<output>ECAM/phases/monostable/to-power-set-output</output>
</flipflop>
</PropertyList>