diff --git a/A320-main.xml b/A320-main.xml
index 5b812a29..531020ec 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -812,6 +812,10 @@
0
0
+
+ 0
+ 0
+
0
0
@@ -819,6 +823,9 @@
0
0
+
+ 0
+
true
@@ -1336,15 +1343,22 @@
0
- 0
0
+ 0
0
+ 0
+ 0
0
0
+ 0
+ 0
0
0
0
+ 0
0
+ 0
+ 0
0
@@ -1597,6 +1611,7 @@
0
+ 0
0
0
@@ -2233,11 +2248,20 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 1
+ aircraft
+
/FMGC/keyboard-left
/FMGC/keyboard-right
/options/system/keyboard-mode
+ /options/system/fgcamera-keys-enabled
property-assign
/sim/current-view/view-number
@@ -2271,11 +2295,20 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 2
+ aircraft
+
/FMGC/keyboard-left
/FMGC/keyboard-right
/options/system/keyboard-mode
+ /options/system/fgcamera-keys-enabled
property-assign
/sim/current-view/view-number
@@ -2310,11 +2343,20 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 3
+ aircraft
+
/FMGC/keyboard-left
/FMGC/keyboard-right
/options/system/keyboard-mode
+ /options/system/fgcamera-keys-enabled
property-assign
/sim/current-view/view-number
@@ -2349,11 +2391,20 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 4
+ aircraft
+
/FMGC/keyboard-left
/FMGC/keyboard-right
/options/system/keyboard-mode
+ /options/system/fgcamera-keys-enabled
property-assign
/sim/current-view/view-number
@@ -2388,11 +2439,20 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 5
+ aircraft
+
/FMGC/keyboard-left
/FMGC/keyboard-right
/options/system/keyboard-mode
+ /options/system/fgcamera-keys-enabled
property-assign
/sim/current-view/view-number
@@ -2429,11 +2489,20 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 6
+ aircraft
+
/FMGC/keyboard-left
/FMGC/keyboard-right
/options/system/keyboard-mode
+ /options/system/fgcamera-keys-enabled
property-assign
/sim/current-view/view-number
@@ -2478,6 +2547,14 @@
/sim/current-view/view-number
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 7
+ aircraft
+
/FMGC/keyboard-left
@@ -2506,6 +2583,14 @@
nasal
+
+
+ /options/system/fgcamera-keys-enabled
+
+ fgcamera-select
+ 8
+ aircraft
+
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index 6744b7b6..1b00c24a 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -557,14 +557,6 @@
radar_glare
-
- select
- engine_fault_1
-
- systems/unused/unused-ped
-
-
-
select
engine_fire_1
@@ -585,15 +577,7 @@
1.0
-
-
- select
- engine_fault_2
-
- systems/unused/unused-ped
-
-
-
+
select
engine_fire_2
@@ -866,6 +850,19 @@
+
+
+ set-tooltip
+ atc_stby_mode
+
+ controls/atc/mode-knob
+ nasal
+
+
+
@@ -1058,12 +1055,13 @@
Aircraft/A320-family/Models/Instruments/IESI/IESI.xml
-
+
+
+
+
+
select
- abs_low_on
- abs_med_on
- abs_max_on
alt-text
alt-text-test
ap1_led
@@ -1071,9 +1069,9 @@
appr_led
arpt_led
arpt_led.001
- a-thr_led
atc-code
atc-test
+ a-thr_led
audio_att_led
audio_att_sgn
audio_call_hf2_led
@@ -1085,19 +1083,165 @@
audio_hf2_led
audio_mech_led
audio_mech_sgn
+ audio_pa_led
audio_voice_led
audio_vhf1_led
audio_vhf2_led
audio_vhf3_led
- autoland_light_on
- brk_fan_on
- brk_hot_on
-
cstr_led
cstr_led.001
+ exped_led
+ fcu_screen
+ fd1_led
+ fd2_led
+ fpa-text
+ hdg-text
+ hdg-text-test
+ ils_led
+ ils2_led
+ loc_led
+ mach-text
+ ndb_led
+ ndb_led.001
+ qnh-hpa
+ qnh-inhg
+ qnh-std
+ qnh-test
+ radio_adf_led
+ radio_am_led
+ radio_bfo_led
+ radio_hf1_led
+ radio_hf2_led
+ radio_ls_led
+ radio_nav_led
+ radio_opt_led
+ radio_vhf1_led
+ radio_vhf2_led
+ radio_vhf3_led
+ radio_vor_led
+ spd-text
+ spd-text-test
+ vord_led
+ vord_led.001
+ vs-text
+ vs-text-last-2-digits
+ vs-text-test
+ wpt_led
+ wpt_led.001
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+
+
+
+
+ select
+ autoland_light_on
+ master_caution_on
+ master_warning_on
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+ /systems/electrical/bus/ac-2
+ 110
+
+
+
+
+
+
+
+ select
+ engine_fire_1
+ engine_fire_2
+ gear_lever_down_arrow
+ lgear_down
+ lgear_unlk
+ ngear_down
+ ngear_unlk
+ rgear_down
+ rgear_unlk
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+
+
+
+
+
+ select
+ brk_fan_on
+ brk_hot_on
+ CockpitDoorFault
+ CockpitDoorOpen
+ engine_fault_1
+ engine_fault_2
+ prio_fo.arrow
+ prio_fo_fo
+
+
+ /systems/electrical/bus/ac-2
+ 110
+
+
+
+
+
+
+
+ select
+ abs_low_on
+ abs_med_on
+ abs_max_on
dec_low_on
dec_med_on
dec_max_on
+ prio_capt.arrow
+ prio_capt.arrow.001
+ prio_capt.capt
+ prio_capt.capt.001
+ radio_sel_led
+ terr_on_nd_on_l
+ terr_on_nd_on_r
+
+
+ /systems/electrical/bus/ac-1
+ 110
+
+
+
+
+
+
+ select
ecam_apu_led
ecam_bleed_led
ecam_cond_led
@@ -1114,66 +1258,6 @@
ecam_press_led
ecam_sts_led
ecam_wheel_led
- exped_led
- fcu_screen
- fd1_led
- fd2_led
- fpa-text
- hdg-text
- hdg-text-test
- ils_led
- ils2_led
- lgear_down
- lgear_unlk
- loc_led
- mach-text
- master_caution_on
- master_warning_on
- ndb_led
- ndb_led.001
- ngear_down
- ngear_unlk
- qnh-hpa
- qnh-inhg
- qnh-std
- qnh-test
- radio_adf_led
- radio_am_led
- radio_bfo_led
- radio_hf1_led
- radio_hf2_led
- radio_ls_led
- radio_nav_led
- radio_opt_led
- radio_sel_led
- radio_vhf1_led
- radio_vhf2_led
- radio_vhf3_led
- radio_vor_led
- rgear_down
- rgear_unlk
- spd-text
- spd-text-test
- terr_on_nd_label
- terr_on_nd_on_l
- terr_on_nd_on_r
- vord_led
- vord_led.001
- vs-text
- vs-text-last-2-digits
- vs-text-test
- wpt_led
- wpt_led.001
-
-
- systems/electrical/bus/dc-ess
- 25
-
-
-
-
-
- select
rudder-trim-letter
rudder-trim
@@ -1211,13 +1295,10 @@
audio_mech_sgn
ecam_c_b_led
ecam_el_dc_led
- ecam_sts_led
engine_fault_1
engine_fault_2
exped_led
- qnh-test
radio_opt_led
- ver.fmgc
controls/switches/annun-test
@@ -1228,7 +1309,9 @@
alt-text-test
hdg-text-test
spd-text-test
+ qnh-test
vs-text-test
+ ver.fmgc
FMGC/FCU-working
@@ -1435,6 +1518,89 @@
+
+
+
+ slider
+ CockpitDoorSwitch
+ CockpitDoorSwitch.mark
+ controls/doors/doorc-switch
+ vertical
+
+
+ property-adjust
+ controls/doors/doorc-switch
+ -1
+ -1
+ 1
+ 0
+
+
+
+
+ property-assign
+ controls/doors/doorc-switch
+ 0
+
+
+
+
+ set-tooltip
+ doorc-switch-lock
+
+
+
+
+
+
+ rotate
+ CockpitDoorSwitch
+ CockpitDoorSwitch.mark
+ controls/doors/doorc-switch
+
+ -1-25
+ 0 0
+ 1 25
+
+
+ CockpitDoorSwitch.axis
+
+
+
+
+ select
+ CockpitDoorOpen
+
+
+
+ controls/switches/annun-test
+ 1
+
+
+ sim/model/door-positions/doorc/lock-status
+ 1
+
+
+
+
+
+
+ select
+ CockpitDoorFault
+
+
+
+ controls/switches/annun-test
+ 1
+
+
+ sim/model/door-positions/doorc/lock-status
+ -9
+
+
+
+
+
pick
@@ -2062,6 +2228,76 @@
+
+
+
+ rotate
+ foot_warmer_cpt_sw
+ foot_warmer_cpt_sw.mark
+ controls/cabin/footwarmer-cpt
+
+ 1-20
+ 020
+
+
+ foot_warmer_cpt_sw.axis
+
+
+
+ pick
+ foot_warmer_cpt_sw
+ foot_warmer_cpt_sw.mark
+
+
+ false
+
+ property-cycle
+ controls/cabin/footwarmer-cpt
+ 1
+ 0
+
+
+ property-toggle
+ /sim/sounde/switch1
+
+
+
+
+
+ rotate
+ foot_warmer_fo_sw
+ foot_warmer_fo_sw.mark
+ controls/cabin/footwarmer-fo
+
+
+ 120
+ 0-20
+
+
+ foot_warmer_fo_sw.axis
+
+
+
+ pick
+ foot_warmer_fo_sw
+ foot_warmer_fo_sw.mark
+
+
+ false
+
+ property-cycle
+ controls/cabin/footwarmer-fo
+ 1
+ 0
+
+
+ property-toggle
+ /sim/sounde/switch1
+
+
+
+
+
pick
@@ -5916,28 +6152,16 @@
select
gear_lever_down_arrow
-
-
-
- systems/electrical/bus/ac-ess
- 110
-
-
- systems/electrical/bus/ac-2
- 110
-
-
-
-
- controls/switches/annun-test
- 1
-
-
- ECAM/warnings/landing-gear-warning-light
- 1
-
-
-
+
+
+ controls/switches/annun-test
+ 1
+
+
+ ECAM/warnings/landing-gear-warning-light
+ 1
+
+
@@ -5945,28 +6169,16 @@
material
gear_lever_down_arrow
-
-
-
- systems/electrical/bus/ac-ess
- 110
-
-
- systems/electrical/bus/ac-2
- 110
-
-
-
-
- controls/switches/annun-test
- 1
-
-
- ECAM/warnings/landing-gear-warning-light
- 1
-
-
-
+
+
+ controls/switches/annun-test
+ 1
+
+
+ ECAM/warnings/landing-gear-warning-light
+ 1
+
+
1.00
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas
index 170cd993..6e51edda 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas
@@ -1,15 +1,6 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
-var elec_pump_y_ovht = props.globals.initNode("/systems/hydraulic/elec-pump-yellow-ovht", 0, "BOOL");
-var elec_pump_b_ovht = props.globals.initNode("/systems/hydraulic/elec-pump-blue-ovht", 0, "BOOL");
-var y_resv_ovht = props.globals.initNode("/systems/hydraulic/yellow-resv-ovht", 0, "BOOL");
-var b_resv_ovht = props.globals.initNode("/systems/hydraulic/blue-resv-ovht", 0, "BOOL");
-var g_resv_ovht = props.globals.initNode("/systems/hydraulic/green-resv-ovht", 0, "BOOL");
-var y_resv_lo_press = props.globals.initNode("/systems/hydraulic/yellow-resv-lo-air-press", 0, "BOOL");
-var b_resv_lo_press = props.globals.initNode("/systems/hydraulic/blue-resv-lo-air-press", 0, "BOOL");
-var g_resv_lo_press = props.globals.initNode("/systems/hydraulic/green-resv-lo-air-press", 0, "BOOL");
-
var canvas_lowerECAMPageHyd =
{
new: func(svg,name) {
@@ -46,22 +37,33 @@ var canvas_lowerECAMPageHyd =
# init
obj.update_items = [
- props.UpdateManager.FromHashValue("blue", 25, func(val) {
- if (val >= 100) {
- obj["Press-Blue"].setText(sprintf("%s", math.round(val, 50)));
- } else {
- obj["Press-Blue"].setText(sprintf("%s", 0));
- }
-
- if (val > 1450) {
- obj["Blue-Line"].setColor(0.0509,0.7529,0.2941);
- obj["Blue-Line"].setColorFill(0.0509,0.7529,0.2941);
- obj["Blue-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
- obj["Blue-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
- obj["Blue-Indicator"].setColor(0.0509,0.7529,0.2941);
- obj["Press-Blue"].setColor(0.0509,0.7529,0.2941);
- obj["Blue-label"].setColor(0.8078,0.8039,0.8078);
+ props.UpdateManager.FromHashList(["blue", "dcEssShed"], 25, func(val) {
+ if (val.dcEssShed >= 25) {
+ if (val.blue >= 100) {
+ obj["Press-Blue"].setText(sprintf("%s", math.round(val.blue, 50)));
+ } else {
+ obj["Press-Blue"].setText(sprintf("%s", 0));
+ }
+
+ if (val.blue > 1450) {
+ obj["Blue-Line"].setColor(0.0509,0.7529,0.2941);
+ obj["Blue-Line"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Blue-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Blue-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Blue-Indicator"].setColor(0.0509,0.7529,0.2941);
+ obj["Press-Blue"].setColor(0.0509,0.7529,0.2941);
+ obj["Blue-label"].setColor(0.8078,0.8039,0.8078);
+ } else {
+ obj["Blue-Line"].setColor(0.7333,0.3803,0);
+ obj["Blue-Line"].setColorFill(0.7333,0.3803,0);
+ obj["Blue-Line-Top"].setColorFill(0.7333,0.3803,0);
+ obj["Blue-Line-Bottom"].setColorFill(0.7333,0.3803,0);
+ obj["Blue-Indicator"].setColor(0.7333,0.3803,0);
+ obj["Press-Blue"].setColor(0.7333,0.3803,0);
+ obj["Blue-label"].setColor(0.7333,0.3803,0);
+ }
} else {
+ obj["Press-Blue"].setText(sprintf("%s", "XX"));
obj["Blue-Line"].setColor(0.7333,0.3803,0);
obj["Blue-Line"].setColorFill(0.7333,0.3803,0);
obj["Blue-Line-Top"].setColorFill(0.7333,0.3803,0);
@@ -71,23 +73,35 @@ var canvas_lowerECAMPageHyd =
obj["Blue-label"].setColor(0.7333,0.3803,0);
}
}),
- props.UpdateManager.FromHashValue("yellow", 25, func(val) {
- if (val >= 100) {
- obj["Press-Yellow"].setText(sprintf("%s", math.round(val, 50)));
- } else {
- obj["Press-Yellow"].setText(sprintf("%s", 0));
- }
-
- if (val > 1450) {
- obj["Yellow-Line"].setColor(0.0509,0.7529,0.2941);
- obj["Yellow-Line"].setColorFill(0.0509,0.7529,0.2941);
- obj["Yellow-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
- obj["Yellow-Line-Middle"].setColorFill(0.0509,0.7529,0.2941);
- obj["Yellow-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
- obj["Yellow-Indicator"].setColor(0.0509,0.7529,0.2941);
- obj["Press-Yellow"].setColor(0.0509,0.7529,0.2941);
- obj["Yellow-label"].setColor(0.8078,0.8039,0.8078);
+ props.UpdateManager.FromHashList(["yellow", "dcEssShed"], 25, func(val) {
+ if (val.dcEssShed >= 25) {
+ if (val.yellow >= 100) {
+ obj["Press-Yellow"].setText(sprintf("%s", math.round(val.yellow, 50)));
+ } else {
+ obj["Press-Yellow"].setText(sprintf("%s", 0));
+ }
+
+ if (val.yellow > 1450) {
+ obj["Yellow-Line"].setColor(0.0509,0.7529,0.2941);
+ obj["Yellow-Line"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Yellow-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Yellow-Line-Middle"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Yellow-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Yellow-Indicator"].setColor(0.0509,0.7529,0.2941);
+ obj["Press-Yellow"].setColor(0.0509,0.7529,0.2941);
+ obj["Yellow-label"].setColor(0.8078,0.8039,0.8078);
+ } else {
+ obj["Yellow-Line"].setColor(0.7333,0.3803,0);
+ obj["Yellow-Line"].setColorFill(0.7333,0.3803,0);
+ obj["Yellow-Line-Top"].setColorFill(0.7333,0.3803,0);
+ obj["Yellow-Line-Middle"].setColorFill(0.7333,0.3803,0);
+ obj["Yellow-Line-Bottom"].setColorFill(0.7333,0.3803,0);
+ obj["Yellow-Indicator"].setColor(0.7333,0.3803,0);
+ obj["Press-Yellow"].setColor(0.7333,0.3803,0);
+ obj["Yellow-label"].setColor(0.7333,0.3803,0);
+ }
} else {
+ obj["Press-Yellow"].setText(sprintf("%s", "XX"));
obj["Yellow-Line"].setColor(0.7333,0.3803,0);
obj["Yellow-Line"].setColorFill(0.7333,0.3803,0);
obj["Yellow-Line-Top"].setColorFill(0.7333,0.3803,0);
@@ -98,23 +112,35 @@ var canvas_lowerECAMPageHyd =
obj["Yellow-label"].setColor(0.7333,0.3803,0);
}
}),
- props.UpdateManager.FromHashValue("green", 25, func(val) {
- if (val >= 100) {
- obj["Press-Green"].setText(sprintf("%s", math.round(val, 50)));
- } else {
- obj["Press-Green"].setText(sprintf("%s", 0));
- }
-
- if (val > 1450) {
- obj["Green-Line"].setColor(0.0509,0.7529,0.2941);
- obj["Green-Line"].setColorFill(0.0509,0.7529,0.2941);
- obj["Green-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
- obj["Green-Line-Middle"].setColorFill(0.0509,0.7529,0.2941);
- obj["Green-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
- obj["Green-Indicator"].setColor(0.0509,0.7529,0.2941);
- obj["Press-Green"].setColor(0.0509,0.7529,0.2941);
- obj["Green-label"].setColor(0.8078,0.8039,0.8078);
+ props.UpdateManager.FromHashList(["green", "dcEssShed"], 25, func(val) {
+ if (val.dcEssShed) {
+ if (val.green >= 100) {
+ obj["Press-Green"].setText(sprintf("%s", math.round(val.green, 50)));
+ } else {
+ obj["Press-Green"].setText(sprintf("%s", 0));
+ }
+
+ if (val.green > 1450) {
+ obj["Green-Line"].setColor(0.0509,0.7529,0.2941);
+ obj["Green-Line"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Green-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Green-Line-Middle"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Green-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
+ obj["Green-Indicator"].setColor(0.0509,0.7529,0.2941);
+ obj["Press-Green"].setColor(0.0509,0.7529,0.2941);
+ obj["Green-label"].setColor(0.8078,0.8039,0.8078);
+ } else {
+ obj["Green-Line"].setColor(0.7333,0.3803,0);
+ obj["Green-Line"].setColorFill(0.7333,0.3803,0);
+ obj["Green-Line-Top"].setColorFill(0.7333,0.3803,0);
+ obj["Green-Line-Middle"].setColorFill(0.7333,0.3803,0);
+ obj["Green-Line-Bottom"].setColorFill(0.7333,0.3803,0);
+ obj["Green-Indicator"].setColor(0.7333,0.3803,0);
+ obj["Press-Green"].setColor(0.7333,0.3803,0);
+ obj["Green-label"].setColor(0.7333,0.3803,0);
+ }
} else {
+ obj["Press-Green"].setText(sprintf("%s", "XX"));
obj["Green-Line"].setColor(0.7333,0.3803,0);
obj["Green-Line"].setColorFill(0.7333,0.3803,0);
obj["Green-Line-Top"].setColorFill(0.7333,0.3803,0);
@@ -514,14 +540,14 @@ var canvas_lowerECAMPageHyd =
};
var input = {
- hydBlueResvOvht: "/systems/hydraulic/blue-resv-ovht",
- hydGreenResvOvht: "/systems/hydraulic/green-resv-ovht",
- hydYellowResvOvht: "/systems/hydraulic/yellow-resv-ovht",
- hydBlueResvLoPrs: "/systems/hydraulic/blue-resv-lo-air-press",
- hydGreenResvLoPrs: "/systems/hydraulic/green-resv-lo-air-press",
- hydYellowResvLoPrs: "/systems/hydraulic/yellow-resv-lo-air-press",
- hydYellowElecPumpOvht: "/systems/hydraulic/elec-pump-yellow-ovht",
- hydBlueElecPumpOvht: "/systems/hydraulic/elec-pump-blue-ovht",
+ hydBlueResvOvht: "/systems/hydraulic/relays/blue-reservoir-overheat",
+ hydGreenResvOvht: "/systems/hydraulic/relays/green-reservoir-overheat",
+ hydYellowResvOvht: "/systems/hydraulic/relays/yellow-reservoir-overheat",
+ hydBlueResvLoPrs: "/systems/failures/hydraulic/blue-reservoir-air-press-lo",
+ hydGreenResvLoPrs: "/systems/failures/hydraulic/green-reservoir-air-press-lo",
+ hydYellowResvLoPrs: "/systems/failures/hydraulic/yellow-reservoir-air-press-lo",
+ hydBlueElecPumpOvht: "/systems/failures/hydraulic/blue-elec-ovht",
+ hydYellowElecPumpOvht: "/systems/failures/hydraulic/yellow-elec-ovht",
hydRATPosition: "/systems/hydraulic/sources/rat/position",
hydGreenFireValve: "/systems/hydraulic/sources/green-edp/fire-valve",
hydYellowFireValve: "/systems/hydraulic/sources/yellow-edp/fire-valve",
@@ -531,7 +557,7 @@ var input = {
hydYellowEDPPumpSwitch: "/controls/hydraulic/switches/yellow-edp",
hydPTUSwitch: "/controls/hydraulic/switches/ptu",
hydPTUFault: "/systems/failures/hydraulic/ptu",
- hydPTUActive: "/systems/hydraulic/sources/ptu/ptu-hydraulic-condition",
+ hydPTUActive: "/systems/hydraulic/sources/ptu/ptu-loop-sound-cmd",
hydPTUDiff: "/systems/hydraulic/yellow-psi-diff",
hydBlueQTY: "/systems/hydraulic/blue-qty",
hydGreenQTY: "/systems/hydraulic/green-qty",
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index 1274ff65..f87c04ac 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -80,9 +80,6 @@ var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1);
var mcdu2_lgt = props.globals.getNode("/controls/lighting/DU/mcdu2", 1);
var acType = props.globals.getNode("/MCDUC/type", 1);
var engType = props.globals.getNode("/MCDUC/eng", 1);
-var database1 = props.globals.getNode("/FMGC/internal/navdatabase", 1);
-var database2 = props.globals.getNode("/FMGC/internal/navdatabase2", 1);
-var databaseCode = props.globals.getNode("/FMGC/internal/navdatabasecode", 1);
# INT-A
var ADIRSMCDUBTN = props.globals.getNode("/controls/adirs/mcducbtn", 1);
@@ -2133,9 +2130,9 @@ var canvas_MCDU_base = {
}
me["Simple_L1"].setText(sprintf("%s", engType.getValue()));
- me["Simple_L2"].setText(sprintf("%s", " " ~ database1.getValue()));
- me["Simple_L3"].setText(sprintf("%s", " " ~ database2.getValue()));
- me["Simple_R2"].setText(sprintf("%s", databaseCode.getValue() ~ " "));
+ me["Simple_L2"].setText(" " ~ fmgc.navDataBase.currentDate);
+ me["Simple_L3"].setText(" " ~ fmgc.navDataBase.standbyDate);
+ me["Simple_R2"].setText(fmgc.navDataBase.currentCode);
if (fmgc.WaypointDatabase.getCount() >= 1) {
me["Simple_R4"].show();
@@ -5225,6 +5222,12 @@ var canvas_MCDU_base = {
me.colorRight(myVertRev[i].R1[2],myVertRev[i].R2[2],myVertRev[i].R3[2],myVertRev[i].R4[2],myVertRev[i].R5[2],myVertRev[i].R6[2]);
}
+
+ if (myVertRev[i] != nil and (myVertRev[i].type == 1 and fmgc.FMGCInternal.desSpdLimSet) or (myVertRev[i].type != 1 and fmgc.FMGCInternal.clbSpdLimSet)) {
+ me["Simple_L2"].setFontSize(normal);
+ } else {
+ me["Simple_L2"].setFontSize(small);
+ }
pageSwitch[i].setBoolValue(1);
}
} else if (page == "DEPARTURE") {
diff --git a/Models/Instruments/ND/canvas/map/RTE.lcontroller b/Models/Instruments/ND/canvas/map/RTE.lcontroller
index e8fc79c7..42343196 100644
--- a/Models/Instruments/ND/canvas/map/RTE.lcontroller
+++ b/Models/Instruments/ND/canvas/map/RTE.lcontroller
@@ -25,7 +25,7 @@ var new = func(layer) {
map: layer.map,
listeners: [],
};
- layer.searcher._equals = func(l,r) 0; # TODO: create model objects instead?
+ layer.searcher._equals = func(l,r) return (l == r);
append(m.listeners, setlistener(layer.options.active_node, func m.layer.update() ), setlistener(layer.options.wp_num, func m.layer.update() ));
m.addVisibilityListener();
var driver = opt_member(m.layer.options, 'route_driver');
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index b2ca3fe8..64a9053e 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -8,57 +8,69 @@
-
+
+
select
- ACPack1Btn1F
- ACPack1Btn2O
- ACPack2Btn1F
- ACPack2Btn2O
- ADR1Btn1F
- ADR1Btn2O
- ADR2Btn1F
- ADR2Btn2O
- ADR3Btn1F
- ADR3Btn2O
- BatteryBtn11F
- BatteryBtn21F
- BusTieBtn2O
- DitchBtn2O
- EmerExtLtBtn2O
- Eng1AntiIceBtn1F
- Eng1AntiIceBtn2O
- Eng2AntiIceBtn1F
- Eng2AntiIceBtn2O
- ExtPwrBtn2O
- IR1Btn1F
- IR1Btn2O
- IR2Btn1F
- IR2Btn2O
- IR3Btn1F
- IR3Btn2O
+ AftCargoIsoBtn1F
+ AftCargoIsoBtn2O
+ APUBleedBtn1F
+ APUBleedBtn2O
+ BlueElecPump1F
+ BlueElecPump2O
+ CargoHotAirBtn1F
+ CargoHotAirBtn2O
+ CrewOxyBtn2O
+ GalleyPwrBtn1F
+ GalleyPwrBtn2O
+ Gen1LineBtn1S
+ Gen1LineBtn2O
+ FuelXfeedBtn1O
+ FuelXfeedBtn2O
+ LFuelTank1Btn1F
+ LFuelTank1Btn2O
+ PassOxyInd1S
RamAirBtn2O
+ RFuelTank1Btn1F
+ RFuelTank1Btn2O
WingAntiIceBtn1F
WingAntiIceBtn2O
- VentBlowBtn1F
- systems/electrical/bus/ac-ess
- 5
+ systems/electrical/bus/ac-ess-shed
+ 110
+
select
+ ACPack1Btn1F
+ ACPack1Btn2O
+ APUFireAgtBtn1S
+ APUFireAgtBtn2D
APUGenBtn1F
APUGenBtn2O
APUMasterBtn1F
APUMasterBtn2O
APUStartBtn1A
APUStartBtn2O
- APUFireAgtBtn1S
- APUFireAgtBtn2D
+ BatteryBtn11F
+ BatteryBtn21F
+ BatteryBtn12O
+ BatteryBtn22O
+ BusTieBtn2O
+ CabinPressModeBtn1F
+ CabinPressModeBtn2M
+ DitchBtn2O
+ ELAC1Btn1F
+ ELAC1Btn2O
+ EmerCallBtn1C
+ EmerCallBtn2O
+ EmerExtLtBtn2O
Eng1FireAgt1Btn1S
Eng1FireAgt1Btn2D
Eng2FireAgt1Btn1S
@@ -67,71 +79,138 @@
Eng1FireAgt2Btn2D
Eng2FireAgt2Btn1S
Eng2FireAgt2Btn2D
- ELAC1Btn1F
- ELAC1Btn2O
- FAC1Btn1F
- FAC1Btn2O
- Gen1Btn1F
- Gen1Btn2O
- Gen2Btn1F
- Gen2Btn2O
- SEC1Btn1F
- SEC1Btn2O
-
-
-
- systems/electrical/bus/ac-si-bus
- 5
-
-
- systems/electrical/bus/ac-ess
- 5
-
-
-
-
-
-
- select
- ACESSFeedBtn1F
- ACESSFeedBtn2A
- AftCargoIsoBtn1F
- AftCargoIsoBtn2O
- AftCargoSmkBtn1S
- AftCargoSmkBtn2D
- BlueElecPump1F
- BlueElecPump2O
- CabinPressModeBtn1F
- CabinPressModeBtn2M
- CabinFansBtn2O
- CargoHotAirBtn1F
- CargoHotAirBtn2O
- CFuelTank1Btn1F
- CFuelTank1Btn2O
- CFuelTank2Btn1F
- CFuelTank2Btn2O
- CrewOxyBtn2O
- ELAC2Btn1F
- ELAC2Btn2O
- EmerCallBtn1C
- EmerCallBtn2O
- EmerGenInd1F
Eng1ManStartBtn2O
Eng2ManStartBtn2O
EvacCommandBtn1E
EvacCommandBtn2O
+ FAC1Btn1F
+ FAC1Btn2O
+ Gen1Btn2O
+ Gen2Btn2O
+ IDG1Btn1F
+ IDG2Btn1F
+ SEC1Btn1F
+ SEC1Btn2O
+ VentBlowBtn1F
+ VentBlowBtn2O
+ VentExtractBtn1F
+ VentExtractBtn2O
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+
+
+
+
+ select
+ ExtPwrBtn1A
+
+
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+ systems/electrical/bus/ac-ess
+ 110
+
+
+
+
+ /systems/electrical/sources/ext/output-volt
+ 110
+
+
+
+ systems/electrical/bus/ac-ess
+ 110
+
+
+
+
+
+
+
+
+
+ select
+ ACESSFeedBtn1F
+ ACESSFeedBtn2A
+ ACPack2Btn1F
+ ACPack2Btn2O
+ CFuelTank1Btn1F
+ CFuelTank1Btn2O
+ ELAC2Btn1F
+ ELAC2Btn2O
+ Eng2AntiIceBtn1F
+ Eng2AntiIceBtn2O
+ Eng2BleedBtn1F
+ Eng2BleedBtn2O
FAC2Btn1F
FAC2Btn2O
+ LFuelTank2Btn1F
+ LFuelTank2Btn2O
+ PrbWinHeatBtn2O
+ PTU1F
+ PTU2O
+ RFuelTank2Btn1F
+ RFuelTank2Btn2O
+ SEC2Btn1F
+ SEC2Btn2O
+ SEC3Btn1F
+ SEC3Btn2O
+ YellowElecPump1F
+ YellowElecPump2O
+ YellowEngPump1F
+ YellowEngPump2O
+
+
+ /systems/electrical/bus/ac-2
+ 110
+
+
+
+
+
+
+ select
+ ADR1Btn1F
+ ADR1Btn2O
+ ADR2Btn1F
+ ADR2Btn2O
+ ADR3Btn1F
+ ADR3Btn2O
+ AftCargoSmkBtn1S
+ AftCargoSmkBtn2D
+ CabinFansBtn2O
+ CFuelTank2Btn1F
+ CFuelTank2Btn2O
+ EmerGenInd1F
+ Eng1AntiIceBtn1F
+ Eng1AntiIceBtn2O
+ Eng1BleedBtn1F
+ Eng1BleedBtn2O
+ ExtPwrBtn2O
FuelModeBtn1F
FuelModeBtn2O
- FuelXfeedBtn1O
- FuelXfeedBtn2O
FwdCargoSmkBtn1S
FwdCargoSmkBtn2D
- GalleyPwrBtn1F
- GalleyPwrBtn2O
- Gen1LineBtn1S
- Gen1LineBtn2O
GPWSBtn1F
GPWSBtn2O
GPWSFlpBtn2O
@@ -143,60 +222,18 @@
GreenEngPump2O
HotAirBtn1F
HotAirBtn2O
- IDG1Btn1F
- IDG2Btn1F
- LFuelTank1Btn1F
- LFuelTank1Btn2O
- LFuelTank2Btn1F
- LFuelTank2Btn2O
- PassOxyInd1S
- PrbWinHeatBtn2O
- PTU1F
- PTU2O
- RamAirBtn2O
+ IR1Btn1F
+ IR1Btn2O
+ IR2Btn1F
+ IR2Btn2O
+ IR3Btn1F
+ IR3Btn2O
RcdrGndCtlBtn2O
- RFuelTank1Btn1F
- RFuelTank1Btn2O
- RFuelTank2Btn1F
- RFuelTank2Btn2O
- SEC2Btn1F
- SEC2Btn2O
- SEC3Btn1F
- SEC3Btn2O
- VentBlowBtn2O
- VentExtractBtn1F
- VentExtractBtn2O
- YellowElecPump1F
- YellowElecPump2O
- YellowEngPump1F
- YellowEngPump2O
-
- systems/electrical/bus/dc-ess
- 25
-
-
-
-
-
- select
- Eng1BleedBtn1F
- Eng1BleedBtn2O
- Eng2BleedBtn1F
- Eng2BleedBtn2O
- APUBleedBtn1F
- APUBleedBtn2O
-
-
-
- systems/electrical/bus/dc-2
- 25
-
-
- systems/electrical/bus/dc-ess-shed
- 25
-
-
+
+ /systems/electrical/bus/ac-1
+ 110
+
@@ -224,22 +261,6 @@
-
- material
- Battery-volt
- Battery-volt-test
-
- 1
- 1
- 1
-
-
- 1
- 1
- 1
-
-
-
select
@@ -1988,12 +2009,6 @@
false
-
-
- systems/electrical/bus/dc-ess
- 25
-
-
property-toggle
controls/hydraulic/switches/green-edp
@@ -2009,20 +2024,8 @@
GreenEngPump1F
-
-
- systems/hydraulic/lights/green-edp-fault
- 1
-
-
- controls/hydraulic/switches/green-edp
- 1
-
-
-
- controls/switches/annun-test
- 1
-
+ systems/hydraulic/lights/green-edp-fault
+ controls/switches/annun-test
@@ -2032,14 +2035,10 @@
GreenEngPump2O
-
+
controls/hydraulic/switches/green-edp
- 0
-
-
- controls/switches/annun-test
- 1
-
+
+ controls/switches/annun-test
@@ -2156,12 +2155,6 @@
false
-
-
- systems/electrical/bus/dc-ess
- 25
-
-
property-toggle
controls/hydraulic/switches/blue-elec
@@ -2177,20 +2170,8 @@
BlueElecPump1F
-
-
- systems/hydraulic/lights/blue-elec-fault
- 1
-
-
- controls/hydraulic/switches/blue-elec
- 1
-
-
-
- controls/switches/annun-test
- 1
-
+ systems/hydraulic/lights/blue-elec-fault
+ controls/switches/annun-test
@@ -2200,14 +2181,10 @@
BlueElecPump2O
-
+
controls/hydraulic/switches/blue-elec
- 0
-
-
- controls/switches/annun-test
- 1
-
+
+ controls/switches/annun-test
@@ -2223,12 +2200,6 @@
false
-
-
- systems/electrical/bus/dc-ess
- 25
-
-
property-toggle
controls/hydraulic/switches/ptu
@@ -2244,20 +2215,8 @@
PTU1F
-
-
- systems/hydraulic/lights/ptu-fault
- 1
-
-
- controls/hydraulic/switches/ptu
- 1
-
-
-
- controls/switches/annun-test
- 1
-
+ systems/hydraulic/lights/ptu-fault
+ controls/switches/annun-test
@@ -2267,14 +2226,10 @@
PTU2O
-
+
controls/hydraulic/switches/ptu
- 0
-
-
- controls/switches/annun-test
- 1
-
+
+ controls/switches/annun-test
@@ -2290,12 +2245,6 @@
false
-
-
- systems/electrical/bus/dc-ess
- 25
-
-
property-toggle
controls/hydraulic/switches/yellow-edp
@@ -2311,20 +2260,8 @@
YellowEngPump1F
-
-
- systems/hydraulic/lights/yellow-edp-fault
- 1
-
-
- controls/hydraulic/switches/yellow-edp
- 1
-
-
-
- controls/switches/annun-test
- 1
-
+ systems/hydraulic/lights/yellow-edp-fault
+ controls/switches/annun-test
@@ -2334,14 +2271,10 @@
YellowEngPump2O
-
+
controls/hydraulic/switches/yellow-edp
- 0
-
-
- controls/switches/annun-test
- 1
-
+
+ controls/switches/annun-test
@@ -2357,12 +2290,6 @@
false
-
-
- systems/electrical/bus/dc-ess
- 25
-
-
property-toggle
controls/hydraulic/switches/yellow-elec
@@ -2378,20 +2305,8 @@
YellowElecPump1F
-
-
- systems/hydraulic/lights/yellow-elec-fault
- 1
-
-
- controls/hydraulic/switches/yellow-elec
- 1
-
-
-
- controls/switches/annun-test
- 1
-
+ systems/hydraulic/lights/yellow-elec-fault
+ controls/switches/annun-test
@@ -2401,14 +2316,8 @@
YellowElecPump2O
-
- controls/hydraulic/switches/yellow-elec
- 1
-
-
- controls/switches/annun-test
- 1
-
+ controls/hydraulic/switches/yellow-elec
+ controls/switches/annun-test
@@ -3043,22 +2952,16 @@
select
BatteryBtn12O
-
-
-
- controls/electrical/switches/bat-1
- 0
-
-
- controls/switches/annun-test
- 1
-
-
-
- systems/electrical/bus/dc-bat
- 25
-
-
+
+
+ controls/electrical/switches/bat-1
+ 0
+
+
+ controls/switches/annun-test
+ 1
+
+
@@ -3110,22 +3013,16 @@
select
BatteryBtn22O
-
-
-
- controls/electrical/switches/bat-2
- 0
-
-
- controls/switches/annun-test
- 1
-
-
-
- systems/electrical/bus/dc-bat
- 25
-
-
+
+
+ controls/electrical/switches/bat-2
+ 0
+
+
+ controls/switches/annun-test
+ 1
+
+
@@ -3271,16 +3168,19 @@
select
Gen1Btn1F
-
-
- systems/electrical/light/gen-1-fault
- 1
-
-
- controls/switches/annun-test
- 1
-
-
+
+
+
+ systems/electrical/light/gen-1-fault
+ 1
+
+
+ controls/switches/annun-test
+ 1
+
+
+ /systems/electrical/sources/idg-1/gcu-1-powered
+
@@ -3515,18 +3415,10 @@
controls/electrical/ground-cart
1
-
-
- controls/switches/annun-test
- 1
-
-
-
- systems/electrical/bus/ac-ess
- 110
-
-
-
+
+ controls/switches/annun-test
+ 1
+
@@ -3581,16 +3473,19 @@
select
Gen2Btn1F
-
-
- systems/electrical/light/gen-2-fault
- 1
-
-
- controls/switches/annun-test
- 1
-
-
+
+
+
+ systems/electrical/light/gen-2-fault
+ 1
+
+
+ controls/switches/annun-test
+ 1
+
+
+ /systems/electrical/sources/idg-2/gcu-2-powered
+
@@ -5291,6 +5186,7 @@
LandingLtLSwtch
+
false
property-cycle
@@ -5306,6 +5202,7 @@
+
false
property-cycle
@@ -5327,6 +5224,7 @@
LandingLtRSwtch
+
false
property-cycle
@@ -5342,6 +5240,7 @@
+
false
property-cycle
@@ -6657,10 +6556,28 @@
material
Eng1FireBtn
-
- systems/fire/engine1/warning-active
- controls/switches/annun-test
-
+
+
+ systems/fire/engine1/warning-active
+ controls/switches/annun-test
+
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+ /systems/electrical/bus/ac-1
+ 110
+
+
+
1.0
@@ -7004,10 +6921,28 @@
material
APUFireBtn
-
- systems/fire/apu/warning-active
- controls/switches/annun-test
-
+
+
+ systems/fire/apu/warning-active
+ controls/switches/annun-test
+
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+ /systems/electrical/bus/ac-1
+ 110
+
+
+
1.0
@@ -7157,10 +7092,28 @@
material
Eng2FireBtn
-
- systems/fire/engine2/warning-active
- controls/switches/annun-test
-
+
+
+ systems/fire/engine2/warning-active
+ controls/switches/annun-test
+
+
+
+
+ systems/electrical/bus/ac-si-bus
+ 110
+
+
+ systems/electrical/bus/ac-ess-shed
+ 110
+
+
+
+ /systems/electrical/bus/ac-1
+ 110
+
+
+
1.0
diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas
index 4177ca1c..e42b750b 100644
--- a/Models/Instruments/PFD/PFD.nas
+++ b/Models/Instruments/PFD/PFD.nas
@@ -779,9 +779,10 @@ var canvas_pfd = {
"FMA_athr_box","FMA_Middle1","FMA_Middle2","ALPHA_MAX","ALPHA_PROT","ALPHA_SW","ALPHA_bars","VLS_min","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_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_digit_UP_metric","ALT_error","ALT_neg","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","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd","Metric_box","Metric_letter","Metric_cur_alt"];
+ "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","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","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd",
+ "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_buss_ref_blue"];
},
getKeysTest: func() {
return ["Test_white","Test_text"];
@@ -791,6 +792,7 @@ var canvas_pfd = {
},
aoa: 0,
showMetricAlt: 0,
+ ASItrendIsShown: 0,
update: func(notification) {
me.updatePower(notification);
@@ -872,6 +874,9 @@ var canvas_pfd = {
if (dmc.DMController.DMCs[me.number].outputs[0] != nil) {
me.ind_spd = dmc.DMController.DMCs[me.number].outputs[0].getValue();
me["ASI_error"].hide();
+ me["ASI_buss"].hide();
+ me["ASI_buss_ref"].hide();
+ me["ASI_buss_ref_blue"].hide();
me["ASI_frame"].setColor(1,1,1);
me["ASI_group"].show();
me["VLS_min"].hide();
@@ -1214,17 +1219,23 @@ var canvas_pfd = {
me["ASI_trend_up"].setTranslation(0, math.clamp(me.ASItrend, 0, 50) * -6.6);
me["ASI_trend_down"].setTranslation(0, math.clamp(me.ASItrend, -50, 0) * -6.6);
- if (me.ASItrend >= 2) {
- me["ASI_trend_up"].show();
- me["ASI_trend_down"].hide();
- } else if (me.ASItrend <= -2) {
- me["ASI_trend_down"].show();
- me["ASI_trend_up"].hide();
+ if (notification.fac1 or notification.fac2) {
+ if (me.ASItrend >= 2 or (me.ASItrendIsShown and me.ASItrend >= 1)) {
+ me["ASI_trend_up"].show();
+ me["ASI_trend_down"].hide();
+ me.ASItrendIsShown = 1;
+ } else if (me.ASItrend <= -2 or (me.ASItrendIsShown and me.ASItrend <= -1)) {
+ me["ASI_trend_up"].hide();
+ me["ASI_trend_down"].show();
+ me.ASItrendIsShown = 1;
+ } else {
+ me["ASI_trend_up"].hide();
+ me["ASI_trend_down"].hide();
+ }
} else {
me["ASI_trend_up"].hide();
me["ASI_trend_down"].hide();
}
-
if (-notification.agl >= -565 and -notification.agl <= 565) {
me["ground_ref"].show();
@@ -1233,7 +1244,19 @@ var canvas_pfd = {
}
} else {
me["ASI_group"].hide();
- me["ASI_error"].show();
+ if (!systems.ADIRS.Operating.adr[0].getValue() and !systems.ADIRS.Operating.adr[1].getValue() and !systems.ADIRS.Operating.adr[2].getValue()) {
+ me["ASI_buss"].show();
+ me["ASI_buss_ref"].show();
+ me["ASI_buss_ref_blue"].show();
+ me["ASI_buss"].setTranslation(0, notification.bussTranslate);
+ me["ASI_buss_ref_blue"].setTranslation(0, notification.bussTranslate);
+ me["ASI_error"].hide();
+ } else {
+ me["ASI_buss"].hide();
+ me["ASI_buss_ref"].hide();
+ me["ASI_buss_ref_blue"].hide();
+ me["ASI_error"].show();
+ }
me["ASI_frame"].setColor(1,0,0);
me["clean_speed"].hide();
me["S_target"].hide();
@@ -2032,6 +2055,8 @@ var input = {
decel: "/FMGC/internal/decel",
radio: "/FMGC/internal/radio",
baro: "/FMGC/internal/baro",
+
+ bussTranslate: "/instrumentation/pfd/buss/translate",
};
foreach (var name; keys(input)) {
diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg
index 28c3d817..d8ba7c1d 100644
--- a/Models/Instruments/PFD/res/pfd.svg
+++ b/Models/Instruments/PFD/res/pfd.svg
@@ -8,7 +8,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="pfd.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ inkscape:version="0.91 r13725"
id="svg2"
version="1.1"
viewBox="0 0 1024 1024"
@@ -40,14 +40,14 @@
inkscape:current-layer="svg2"
inkscape:window-maximized="1"
inkscape:window-y="-8"
- inkscape:window-x="-8"
- inkscape:cy="1074.3176"
- inkscape:cx="955.3885"
- inkscape:zoom="2"
- showgrid="true"
+ inkscape:window-x="1592"
+ inkscape:cy="650.95194"
+ inkscape:cx="172.61297"
+ inkscape:zoom="4.0000002"
+ showgrid="false"
id="namedview371"
- inkscape:window-height="705"
- inkscape:window-width="1366"
+ inkscape:window-height="1030"
+ inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="1"
guidetolerance="10"
@@ -55,7 +55,9 @@
objecttolerance="20"
borderopacity="1"
bordercolor="#666666"
- pagecolor="#000000">
+ pagecolor="#000000"
+ inkscape:pagecheckerboard="0"
+ inkscape:document-units="pt">
+ style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20011;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20025;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;stroke:#ff0000;stroke-width:5.7;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;stroke:#ff0000;stroke-width:6.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;stroke:#ff0000;stroke-width:7.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.73024;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.30556;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:8.10006;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#c9cc15;stroke-width:3.99994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
@@ -1032,9 +1034,9 @@
inkscape:connector-curvature="0"
id="path3932"
d="m 340.35189,239.5184 5.62182,14.20878"
- style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
0000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:45px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">0000
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00
+ id="ASI_group"
+ style="display:inline">
.
+
+
+
+
+
+ FAST
+
+ SLOW
+
+
+
+
+
+ id="ASI_error"
+ style="display:inline">
MM
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;stroke-width:0.75">MM
OM
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1;stroke-width:0.75">OM
402000806040200080
NE-800
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">-800
11070
M
+ style="font-size:38.3994px;line-height:1.25;fill:#179ab7;fill-opacity:1;stroke-width:0.75">M
= 5 and phaseVar3 <= 7) {
@@ -977,13 +1245,13 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(hydBYloPrRat);
}
- if (hydBYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and systems.HYD.Qty.yellow.getValue() >= 3.5) {
+ if (hydBYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and !systems.HYD.Pump.yellowElecFail.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and !systems.HYD.Fail.yellowReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.yellowReservoirOvht.getBoolValue() and !systems.HYD.Warnings.yellowLoLvl.getBoolValue()) {
hydBYloPrYElec.active = 1;
} else {
ECAM_controller.warningReset(hydBYloPrYElec);
}
- if (hydBYloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) {
+ if (hydBYloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 1.8 and !systems.HYD.Fail.blueReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.blueReservoirOvht.getBoolValue() and !systems.HYD.Warnings.blueLoLvl.getBoolValue()) {
hydBYloPrRatOn.active = 1;
} else {
ECAM_controller.warningReset(hydBYloPrRatOn);
@@ -1052,7 +1320,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(hydGBloPrRat);
}
- if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) {
+ if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 1.8 and !systems.HYD.Fail.blueReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.blueReservoirOvht.getBoolValue() and !systems.HYD.Warnings.blueLoLvl.getBoolValue()) {
hydGBloPrRatOn.active = 1;
} else {
ECAM_controller.warningReset(hydGBloPrRatOn);
@@ -1105,7 +1373,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(hydGBloPrFmsPredict);
}
- if (hydGYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.greenYellow.getValue()) {
+ if (hydGYloPr.clearFlag == 0 and warningNodes.Logic.greenYellow.getValue()) {
hydGYloPr.active = 1;
if (hydGYloPrPtu.clearFlag == 0 and systems.HYD.Switch.ptu.getValue() != 0) {
hydGYloPrPtu.active = 1;
@@ -1125,7 +1393,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(hydGYloPrYEng);
}
- if (hydGYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and systems.HYD.Qty.yellow.getValue() >= 3.5) {
+ if (hydGYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and !systems.HYD.Pump.yellowElecFail.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and !systems.HYD.Fail.yellowReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.yellowReservoirOvht.getBoolValue() and !systems.HYD.Warnings.yellowLoLvl.getBoolValue()) {
hydGYloPrYElec.active = 1;
} else {
ECAM_controller.warningReset(hydGYloPrYElec);
@@ -1294,7 +1562,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(eng1FailRelight);
}
- if (warningNodes.Logic.eng1Shutdown.getValue() and eng1ShutDown.clearFlag == 0) {
+ if (warningNodes.Logic.eng1Shutdown.getValue() and !warningNodes.Logic.eng1Fail.getValue() and eng1ShutDown.clearFlag == 0) {
eng1ShutDown.active = 1;
if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[0].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) {
@@ -1501,7 +1769,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(eng2FailRelight);
}
- if (warningNodes.Logic.eng2Shutdown.getValue() and eng2ShutDown.clearFlag == 0) {
+ if (warningNodes.Logic.eng2Shutdown.getValue() and !warningNodes.Logic.eng2Fail.getValue() and eng2ShutDown.clearFlag == 0) {
eng2ShutDown.active = 1;
if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[1].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) {
@@ -2058,7 +2326,7 @@ var messages_priority_2 = func {
}
gearPosition = pts.Gear.position[1].getValue();
- if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
+ if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
directLaw.active = 1;
directLawProt.active = 1;
if (directLawMaxSpeed.clearFlag == 0 and !fbw.tripleADRFail and gearPosition != 1) {
@@ -2096,7 +2364,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(directLawSpdBrk2);
}
- if (altnLaw.clearFlag == 0 and warningNodes.Timers.altnLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
+ if (altnLaw.clearFlag == 0 and warningNodes.Timers.altnLaw.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
altnLaw.active = 1;
altnLawProt.active = 1;
if (altnLawMaxSpeed.clearFlag == 0 and altnLawMaxSpeed2.clearFlag == 0 and !fbw.tripleADRFail) {
@@ -2950,18 +3218,19 @@ var messages_priority_2 = func {
if (wingIceSysFault.clearFlag == 0 and warningNodes.Logic.waiSysfault.getBoolValue() and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6)) {
wingIceSysFault.active = 1;
- if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) {
+ if (wingIceSysFaultXbld.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) {
wingIceSysFaultXbld.active = 1;
} else {
ECAM_controller.warningReset(wingIceSysFaultXbld);
}
- if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) {
+
+ if (wingIceSysFaultOff.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) {
wingIceSysFaultOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceSysFaultOff);
}
- if (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) {
+ if (wingIceSysFaultIcing.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue())) {
wingIceSysFaultIcing.active = 1;
} else {
ECAM_controller.warningReset(wingIceSysFaultIcing);
@@ -2973,10 +3242,158 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(wingIceSysFaultIcing);
}
+ if (wingIceLOpen.clearFlag == 0 and warningNodes.Logic.waiLopen.getBoolValue() and (phaseVar2 <= 3 or phaseVar2 >= 9 or phaseVar2 == 6)) {
+ wingIceLOpen.active = 1;
+
+ if (wingIceLOpenOff.clearFlag == 0 and wing_pb.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9)) {
+ wingIceLOpenOff.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenOff);
+ }
+
+ if (FWC.Timer.gnd.getValue() == 1) {
+ if (wingIceLOpenEngOff.clearFlag == 0 and systems.PNEU.Switch.bleed1.getBoolValue()) {
+ wingIceLOpenEngOff.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenEngOff);
+ }
+
+ if (wingIceLOpenXbld.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) {
+ wingIceLOpenXbld.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenXbld);
+ }
+
+ if (wingIceLOpenApuOff.clearFlag == 0 and systems.PNEU.Valves.apu.getValue() != 0) {
+ wingIceLOpenApuOff.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenApuOff);
+ }
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenEngOff);
+ ECAM_controller.warningReset(wingIceLOpenXbld);
+ ECAM_controller.warningReset(wingIceLOpenApuOff);
+ }
+
+ if (wingIceLOpenFlt.clearFlag == 0 and phaseVar2 != 9 and phaseVar2 != 10 and (wing_pb.getValue() == 0 or FWC.Timer.gnd.getValue() == 1)) {
+ wingIceLOpenFlt.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenFlt);
+ }
+
+ if (FWC.Timer.gnd.getValue() != 1) {
+ if (wingIceLOpenEngOn.clearFlag == 0 and !systems.PNEU.Switch.bleed1.getBoolValue()) {
+ wingIceLOpenEngOn.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenEngOn);
+ }
+
+ if (wingIceLOpenIceReq.clearFlag == 0 and !wing_pb.getValue()) {
+ wingIceLOpenIceReq.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenIceReq);
+ }
+
+ if (wingIceLOpenThrust.clearFlag == 0 and systems.PNEU.Switch.bleed1.getBoolValue() and !wing_pb.getValue()) {
+ wingIceLOpenThrust.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenThrust);
+ }
+ } else {
+ ECAM_controller.warningReset(wingIceLOpenEngOn);
+ ECAM_controller.warningReset(wingIceLOpenIceReq);
+ ECAM_controller.warningReset(wingIceLOpenThrust);
+ }
+ } else {
+ ECAM_controller.warningReset(wingIceLOpen);
+ ECAM_controller.warningReset(wingIceLOpenOff);
+ ECAM_controller.warningReset(wingIceLOpenEngOff);
+ ECAM_controller.warningReset(wingIceLOpenXbld);
+ ECAM_controller.warningReset(wingIceLOpenApuOff);
+ ECAM_controller.warningReset(wingIceLOpenFlt);
+ ECAM_controller.warningReset(wingIceLOpenEngOn);
+ ECAM_controller.warningReset(wingIceLOpenIceReq);
+ ECAM_controller.warningReset(wingIceLOpenThrust);
+ }
+
+ if (wingIceROpen.clearFlag == 0 and warningNodes.Logic.waiRopen.getBoolValue() and (phaseVar2 <= 3 or phaseVar2 >= 9 or phaseVar2 == 6)) {
+ wingIceROpen.active = 1;
+
+ if (wingIceROpenOff.clearFlag == 0 and wing_pb.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9)) {
+ wingIceROpenOff.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenOff);
+ }
+
+ if (FWC.Timer.gnd.getValue() == 1) {
+ if (wingIceROpenEngOff.clearFlag == 0 and systems.PNEU.Switch.bleed2.getBoolValue()) {
+ wingIceROpenEngOff.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenEngOff);
+ }
+
+ if (wingIceROpenXbld.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) {
+ wingIceROpenXbld.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenXbld);
+ }
+
+ if (wingIceROpenApuOff.clearFlag == 0 and systems.PNEU.Valves.apu.getValue() != 0) {
+ wingIceROpenApuOff.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenApuOff);
+ }
+ } else {
+ ECAM_controller.warningReset(wingIceROpenEngOff);
+ ECAM_controller.warningReset(wingIceROpenXbld);
+ ECAM_controller.warningReset(wingIceROpenApuOff);
+ }
+
+ if (wingIceROpenFlt.clearFlag == 0 and phaseVar2 != 9 and phaseVar2 != 10 and (wing_pb.getValue() == 0 or FWC.Timer.gnd.getValue() == 1)) {
+ wingIceROpenFlt.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenFlt);
+ }
+
+ if (FWC.Timer.gnd.getValue() != 1) {
+ if (wingIceROpenEngOn.clearFlag == 0 and !systems.PNEU.Switch.bleed2.getBoolValue()) {
+ wingIceROpenEngOn.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenEngOn);
+ }
+
+ if (wingIceROpenIceReq.clearFlag == 0 and !wing_pb.getValue()) {
+ wingIceROpenIceReq.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenIceReq);
+ }
+
+ if (wingIceROpenThrust.clearFlag == 0 and systems.PNEU.Switch.bleed2.getBoolValue() and !wing_pb.getValue()) {
+ wingIceROpenThrust.active = 1;
+ } else {
+ ECAM_controller.warningReset(wingIceROpenThrust);
+ }
+ } else {
+ ECAM_controller.warningReset(wingIceROpenEngOn);
+ ECAM_controller.warningReset(wingIceROpenIceReq);
+ ECAM_controller.warningReset(wingIceROpenThrust);
+ }
+ } else {
+ ECAM_controller.warningReset(wingIceROpen);
+ ECAM_controller.warningReset(wingIceROpenOff);
+ ECAM_controller.warningReset(wingIceROpenEngOff);
+ ECAM_controller.warningReset(wingIceROpenXbld);
+ ECAM_controller.warningReset(wingIceROpenApuOff);
+ ECAM_controller.warningReset(wingIceROpenFlt);
+ ECAM_controller.warningReset(wingIceROpenEngOn);
+ ECAM_controller.warningReset(wingIceROpenIceReq);
+ ECAM_controller.warningReset(wingIceROpenThrust);
+ }
+
if (wingIceOpenGnd.clearFlag == 0 and warningNodes.Logic.waiGndFlight.getValue() and (phaseVar2 <= 2 or phaseVar2 >= 9)) {
wingIceOpenGnd.active = 1;
- if (pts.Gear.wow[1].getValue() and wing_pb.getValue()) {
+ if (FWC.Timer.gnd.getValue() == 1 and wing_pb.getValue()) {
wingIceOpenGndShut.active = 1;
} else {
ECAM_controller.warningReset(wingIceOpenGndShut);
@@ -3165,7 +3582,7 @@ var messages_config_memo = func {
toMemoLine1.colour = "c";
}
- if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue() ) {
+ if (pts.Controls.Lighting.seatbeltSign.getValue() and pts.Controls.Lighting.noSmokingSign.getValue()) {
toMemoLine2.msg = " SIGNS ON";
toMemoLine2.colour = "g";
} else {
@@ -3231,7 +3648,7 @@ var messages_config_memo = func {
ldgMemoLine1.colour = "c";
}
- if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue()) {
+ if (pts.Controls.Lighting.seatbeltSign.getValue() and pts.Controls.Lighting.noSmokingSign.getValue()) {
ldgMemoLine2.msg = " SIGNS ON";
ldgMemoLine2.colour = "g";
} else {
@@ -3356,19 +3773,19 @@ var messages_memo = func {
gnd_splrs.active = 0;
}
- if (libraries.seatbeltLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
+ if (pts.Controls.Lighting.seatbeltSign.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
seatbelts.active = 1;
} else {
seatbelts.active = 0;
}
- if (libraries.noSmokingLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed!
+ if (pts.Controls.Lighting.noSmokingSign.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed!
nosmoke.active = 1;
} else {
nosmoke.active = 0;
}
- if (getprop("/controls/lighting/strobe") == 0 and !pts.Gear.wow[1].getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties
+ if (!pts.Controls.Lighting.strobe.getValue() and !pts.Gear.wow[1].getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties
strobe_lt_off.active = 1;
} else {
strobe_lt_off.active = 0;
@@ -3393,7 +3810,7 @@ var messages_memo = func {
fob_66L.active = 0;
}
- if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
+ if (pts.Instrumentation.MKVII.Inputs.Discretes.flapAllOverride.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
gpws_flap_mode_off.active = 1;
} else {
gpws_flap_mode_off.active = 0;
@@ -3564,13 +3981,13 @@ var messages_right_memo = func {
wing_aice.active = 0;
}
- if (systems.PNEU.Switch.apu.getValue() == 1 and pts.APU.rpm.getValue() >= 95) {
+ if (systems.PNEU.Switch.apu.getValue() == 1 and systems.PNEU.Valves.apu.getValue() != 0 and systems.APUController.APU != nil and systems.APUController.APU.signals.available.getBoolValue()) {
apu_bleed.active = 1;
} else {
apu_bleed.active = 0;
}
- if (apu_bleed.active == 0 and pts.APU.rpm.getValue() >= 95) {
+ if (apu_bleed.active == 0 and systems.APUController.APU != nil and systems.APUController.APU.signals.available.getBoolValue()) {
apu_avail.active = 1;
} else {
apu_avail.active = 0;
@@ -3588,7 +4005,7 @@ var messages_right_memo = func {
brk_fan.active = 0;
}
- if (pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue() == 1) { # todo: emer elec
+ if (pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue()) { # todo: emer elec
gpws_flap3.active = 1;
} else {
gpws_flap3.active = 0;
diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas
index 3355a4eb..07248983 100644
--- a/Nasal/ECAM/ECAM-messages.nas
+++ b/Nasal/ECAM/ECAM-messages.nas
@@ -18,7 +18,7 @@ var warnings = std.Vector.new([
var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"),
var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"),
- var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"),
var allEngFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
var allEngFailSPD1 = warning.new(msg: " OPT RELIGHT SPD.260/.77", colour: "c"),
var allEngFailSPD2 = warning.new(msg: " OPT RELIGHT SPD.270/.77", colour: "c"),
@@ -40,7 +40,7 @@ var warnings = std.Vector.new([
var eng2ThrLvrAbvIdle2 = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
# ENG 1 FIRE (flight)
- var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"),
var eng1FireFllever = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"),
var eng1FireFlmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng1FireFlPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"),
@@ -63,7 +63,7 @@ var warnings = std.Vector.new([
var eng1FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# ENG 2 FIRE (flight)
- var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"),
var eng2FireFllever = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
var eng2FireFlmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng2FireFlPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"),
@@ -85,8 +85,15 @@ var warnings = std.Vector.new([
var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
+ # APU FIRE
+ var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apuPage"),
+ var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"),
+ var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"),
+ var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
+ var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", colour: "c"),
+
# ADR 1 + 2 + 3 FAULT
- var ADR123Fault = warning.new(msg: "NAV ADR1+2+3 FAULT ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var ADR123Fault = warning.new(msg: "NAV ADR 1+2+3 FAULT ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var ADR123FaultAP = warning.new(msg: " -AP+FD..............OFF", colour: "c"),
var ADR123FaultATHR = warning.new(msg: " -ATHR...............OFF", colour: "c"),
var ADR123FaultPRBW = warning.new(msg: " -PROBE/WINDOW HEAT...ON", colour: "c"),
@@ -99,28 +106,28 @@ var warnings = std.Vector.new([
var ADR123FaultSTBY = warning.new(msg: " -STBY INST.MAY BE UNREL", colour: "c"),
var ADR123FaultPROC = warning.new(msg: " -ALL ADR OFF PROC.APPLY", colour: "c"),
- # APU FIRE
- var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apuPage"),
- var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"),
- var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"),
- var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
- var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", colour: "c"),
-
# Config
var slats_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0),
var slats_config_1 = warning.new(msg: "SLATS NOT IN T.O. CONFIG", colour: "r", aural: 0, light: 0),
var flaps_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0),
var flaps_config_1 = warning.new(msg: "FLAPS NOT IN T.O. CONFIG", colour: "r", aural: 0, light: 0),
- var spd_brk_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0),
+ var spd_brk_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"),
var spd_brk_config_1 = warning.new(msg: "SPD BRK NOT RETRACTED", colour: "r", aural: 0, light: 0),
- var pitch_trim_config = warning.new(msg: "CONFIG PITCH TRIM", colour: "r", aural: 0, light: 0),
+ var pitch_trim_config = warning.new(msg: "CONFIG PITCH TRIM", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"),
var pitch_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0),
- var rud_trim_config = warning.new(msg: "CONFIG RUD TRIM", colour: "r", aural: 0, light: 0),
+ var rud_trim_config = warning.new(msg: "CONFIG RUD TRIM", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"),
var rud_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0),
var park_brk_config = warning.new(msg: "CONFIG PARK BRK ON", colour: "r", aural: 0, light: 0),
+ var l_sidestick_fault = warning.new(msg: "CONFIG L SIDESTICK FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var l_sidestick_fault_to = warning.new(msg: " (BY TAKE OVER)", colour: "r"),
+ var l_sidestick_fault_pb = warning.new(msg: " -L TAKE OVER....DEPRESS", colour: "c"),
+ var r_sidestick_fault = warning.new(msg: "CONFIG R SIDESTICK FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var r_sidestick_fault_to = warning.new(msg: " (BY TAKE OVER)", colour: "r"),
+ var r_sidestick_fault_pb = warning.new(msg: " -R TAKE OVER....DEPRESS", colour: "c"),
+
# EXCESS CAB ALT
- var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "cabPressPage"),
var excessCabAltMask = warning.new(msg: " -CREW OXY MASKS.....USE", colour: "c"),
var excessCabAltSigns = warning.new(msg: " -SIGNS...............ON", colour: "c"),
var excessCabAltEmerD = warning.new(msg: " .EMER DESCENT:", colour: "w"),
@@ -129,6 +136,7 @@ var warnings = std.Vector.new([
var excessCabAltSPDBRK = warning.new(msg: " -SPD BRK...........FULL", colour: "c"),
var excessCabAltSPD = warning.new(msg: " SPD.....MAX/APPROPRIATE", colour: "c"),
var excessCabAltENG = warning.new(msg: " -ENG MODE...........IGN", colour: "c"),
+ var excessCabAltATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var excessCabAltCAB = warning.new(msg: " -CABIN CREW......ADVISE", colour: "c"),
var excessCabAltPA = warning.new(msg: " -EMER DES (PA).ANNOUNCE", colour: "c"),
var excessCabAltXPDR = warning.new(msg: " -XPDR 7700.....CONSIDER", colour: "c"),
@@ -137,21 +145,21 @@ var warnings = std.Vector.new([
var excessCabAltMasks = warning.new(msg: " -PAX OXY MASKS...MAN ON", colour: "c"),
# ENG 1 OIL LO PR
- var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"),
var eng1OilLoPrIf = warning.new(msg: " .IF OIL PR < 13 PSI :", colour: "w"),
var eng1OilLoPrIf2 = warning.new(msg: " .IF OIL PR < 60 PSI :", colour: "w"),
var eng1OilLoPrThrot = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"),
var eng1OilLoPrMaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
# ENG 2 OIL LO PR
- var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"),
var eng2OilLoPrIf = warning.new(msg: " .IF OIL PR < 13 PSI :", colour: "w"),
var eng2OilLoPrIf2 = warning.new(msg: " .IF OIL PR < 60 PSI :", colour: "w"),
var eng2OilLoPrThrot = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
var eng2OilLoPrMaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
# FCTL L+R ELEV FAULT
- var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "fctlPage"),
var lrElevFaultSpeed = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"),
var lrElevFaultTrim = warning.new(msg: " -MAN PITCH TRIM.....USE", colour: "c"),
var lrElevFaultSpdBrk = warning.new(msg: " SPD BRK......DO NOT USE", colour: "c"),
@@ -159,7 +167,7 @@ var warnings = std.Vector.new([
# Gear not down
var gearNotDown = warning.new(msg: "L/G GEAR NOT DOWN", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "wheelPage"),
var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"),
var gearNotDownLockedWork = warning.new(msg: " .IF UNSUCCESSFUL:", colour: "w"),
var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "w"),
@@ -169,14 +177,14 @@ var warnings = std.Vector.new([
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0, isMainMsg: 1),
# Cargo smoke
- var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "condPage"),
var cargoSmokeFwdFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"),
var cargoSmokeFwdGrdClsd = warning.new(msg: " .IF FWD CRG CLSD:", colour: "w"),
var cargoSmokeFwdAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
var cargoSmokeFwdGrd = warning.new(msg: " .WHEN ON GROUND", colour: "w"),
var cargoSmokeFwdDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w"),
var cargoSmokeFwdDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"),
- var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "condPage"),
var cargoSmokeAftFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"),
var cargoSmokeAftGrdClsd = warning.new(msg: " .IF AFT CRG CLSD:", colour: "w"),
var cargoSmokeAftAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
@@ -189,18 +197,18 @@ var warnings = std.Vector.new([
var lavatorySmokeComm = warning.new(msg: "-CKPT/CAB COM.ESTABLISH ", colour: "c"),
# EXCES RESID PR
- var excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "cabPressPage"),
var excessResidPressPack1 = warning.new(msg: "-PACK 1.............OFF", colour: "c"),
var excessResidPressPack2 = warning.new(msg: "-PACK 2.............OFF", colour: "c"),
var excessResidPressCabCr = warning.new(msg: "-CABIN CREW.......ALERT", colour: "c"),
# ESS Bus on Bat
# NEW EMER CONFIG
- var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "elecPage"),
var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
# Emer Config
- var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "elecPage"),
var emerconfigMinRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
var emerconfigGen = warning.new(msg: " -GEN 1+2....OFF THEN ON", colour: "c"),
var emerconfigGen2 = warning.new(msg: " .IF UNSUCCESSFUL :", colour: "w"),
@@ -219,7 +227,7 @@ var warnings = std.Vector.new([
var emerconfigFMSPRD = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# B + Y LO PR
- var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"),
var hydBYloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
var hydBYloPrYElec = warning.new(msg: " -YELLOW ELEC PUMP....ON", colour: "c"),
var hydBYloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"),
@@ -232,7 +240,7 @@ var warnings = std.Vector.new([
var hydBYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# G + B LO PR
- var hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"),
var hydGBloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
var hydGBloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"),
var hydGBloPrBElec = warning.new(msg: " -BLUE ELEC PUMP.....OFF", colour: "c"),
@@ -243,7 +251,7 @@ var warnings = std.Vector.new([
var hydGBloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# G + Y LO PR
- var hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"),
var hydGYloPrPtu = warning.new(msg: " -PTU................OFF", colour: "c"),
var hydGYloPrGEng = warning.new(msg: " -GREEN ENG 1 PUMP...OFF", colour: "c"),
var hydGYloPrYEng = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF", colour: "c"),
@@ -253,7 +261,7 @@ var warnings = std.Vector.new([
var hydGYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# AIR BLEED LEAK
- var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "bleedPage"),
var airBleedLeakShut = warning.new(msg: " -X BLEED..........SHUT", colour: "c"),
# LEVEL 2 WARN
@@ -543,20 +551,9 @@ var warnings = std.Vector.new([
var fac2FaultSuccess = warning.new(msg: " .IF UNSUCCESSFUL :", colour: "w"),
var fac2FaultFacOff = warning.new(msg: " -FAC 2..............OFF", colour: "c"),
- var yawDamper1Fault = warning.new(msg: "AUTO FLT YAW DAMPER 1", colour: "a", isMainMsg: 1),
- var yawDamper2Fault = warning.new(msg: "AUTO FLT YAW DAMPER 2", colour: "a", isMainMsg: 1),
- # var rudTrim1Fault = warning.new(msg: "AUTO FLT RUD TRIM1 FAULT", colour: "a", isMainMsg: 1), not implemented
- # var rudTrim2Fault = warning.new(msg: "AUTO FLT RUD TRIM2 FAULT", colour: "a", isMainMsg: 1), not implemented
- var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1),
- var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1),
-
# FCU fault
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"),
- var fcuFault1 = warning.new(msg: "AUTO FLT FCU 1 FAULT", colour: "a", isMainMsg: 1),
- var fcuFault1Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
- var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1),
- var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
# FUEL
var wingLoLvl = warning.new(msg: "FUEL L+R WING TK LO LVL", colour: "a", aural: 1, light: 1, isMainMsg: 1),
@@ -691,7 +688,6 @@ var warnings = std.Vector.new([
var wingIceLOpenEngOff = warning.new(msg: " -ENG1 BLEED.........OFF", colour: "c"),
var wingIceLOpenXbld = warning.new(msg: " -X BLEED...........SHUT", colour: "c"),
var wingIceLOpenApuOff = warning.new(msg: " -APU BLEED..........OFF", colour: "c"),
- var wingIceLOpenSpacer = warning.new(msg: " ", colour: "c"),
var wingIceLOpenFlt = warning.new(msg: " WAI AVAIL IN FLT", colour: "c"),
var wingIceLOpenEngOn = warning.new(msg: " -ENG1 BLEED.........OFF", colour: "c"),
var wingIceLOpenIceReq = warning.new(msg: " -WING ANTI ICE..AS RQRD", colour: "c"),
@@ -701,13 +697,24 @@ var warnings = std.Vector.new([
var wingIceROpenEngOff = warning.new(msg: " -ENG2 BLEED.........OFF", colour: "c"),
var wingIceROpenXbld = warning.new(msg: " -X BLEED...........SHUT", colour: "c"),
var wingIceROpenApuOff = warning.new(msg: " -APU BLEED..........OFF", colour: "c"),
- var wingIceROpenSpacer = warning.new(msg: " ", colour: "c"),
var wingIceROpenFlt = warning.new(msg: " WAI AVAIL IN FLT", colour: "c"),
var wingIceROpenEngOn = warning.new(msg: " -ENG2 BLEED.........OFF", colour: "c"),
var wingIceROpenIceReq = warning.new(msg: " -WING ANTI ICE..AS RQRD", colour: "c"),
var wingIceROpenThrust = warning.new(msg: " THRUST LIM PENALTY", colour: "c"),
var wingIceOpenGnd = warning.new(msg: "WING A.ICE OPEN ON GND", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var wingIceOpenGndShut = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
+
+ var yawDamper1Fault = warning.new(msg: "AUTO FLT YAW DAMPER 1", colour: "a", isMainMsg: 1),
+ var yawDamper2Fault = warning.new(msg: "AUTO FLT YAW DAMPER 2", colour: "a", isMainMsg: 1),
+ # var rudTrim1Fault = warning.new(msg: "AUTO FLT RUD TRIM1 FAULT", colour: "a", isMainMsg: 1), not implemented
+ # var rudTrim2Fault = warning.new(msg: "AUTO FLT RUD TRIM2 FAULT", colour: "a", isMainMsg: 1), not implemented
+ var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1),
+ var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1),
+ var fcuFault1 = warning.new(msg: "AUTO FLT FCU 1 FAULT", colour: "a", isMainMsg: 1),
+ var fcuFault1Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
+ var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1),
+ var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
+
var wingIceLHiPr = warning.new(msg: "WING A.ICE L HI PR", colour: "a", isMainMsg: 1),
var wingIceLHiPrThrust = warning.new(msg: " THRUST LIM PENTALTY", colour: "c"),
var wingIceRHiPr = warning.new(msg: "WING A.ICE R HI PR", colour: "a", isMainMsg: 1),
diff --git a/Nasal/ECAM/ECAM-nodes.nas b/Nasal/ECAM/ECAM-nodes.nas
index 9a345383..f14b0d0c 100644
--- a/Nasal/ECAM/ECAM-nodes.nas
+++ b/Nasal/ECAM/ECAM-nodes.nas
@@ -74,6 +74,11 @@ var FWC = {
var warningNodes = {
Logic: {
+ JE1TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"),
+ JE2TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"),
+ adr123Fault: props.globals.initNode("/ECAM/warnings/navigation/ADR123-fault"),
+ eng1OilLoPr: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-oil-lo-pr"),
+ eng2OilLoPr: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-oil-lo-pr"),
altitudeAlert: props.globals.initNode("/ECAM/warnings/altitude-alert/c-chord"),
altitudeAlertSteady: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-steady"),
altitudeAlertFlash: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-flash"),
@@ -90,6 +95,8 @@ var warningNodes = {
bleed2LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-pack"),
bleed2WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-2-wai-avail"),
waiSysfault: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-sys-fault"),
+ waiLopen: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-open"),
+ waiRopen: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-open"),
waiLclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-closed"),
waiRclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-closed"),
procWaiShutdown: props.globals.initNode("/ECAM/warnings/logic/proc-wai-shutdown-output"),
@@ -149,6 +156,8 @@ var warningNodes = {
gen1Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-1-off"),
gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"),
spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"),
+ excessPress: props.globals.initNode("/ECAM/warnings/press/exess-residual-pressure"),
+ excessCabAlt: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@@ -212,5 +221,7 @@ var warningNodes = {
parkBrk: props.globals.initNode("/ECAM/warnings/config/park-brk/park-brk-output"),
eng1ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle"),
eng2ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle"),
+ cabPressExcessFlipflopTop: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top"),
+ cabPressExcessFlipflop: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt-flipflop"),
},
};
\ No newline at end of file
diff --git a/Nasal/ECAM/ECAM-phases.nas b/Nasal/ECAM/ECAM-phases.nas
index 6b959355..5d15918b 100644
--- a/Nasal/ECAM/ECAM-phases.nas
+++ b/Nasal/ECAM/ECAM-phases.nas
@@ -96,6 +96,6 @@ var setPhase = func(newPhase) {
}
}
-setlistener("/ECAM/buttons/recall-btn", func() {
- FWC.Flipflop.recallSet.setValue(FWC.Btn.recall.getBoolValue());
+setlistener("/ECAM/buttons/recall-btn", func(val) {
+ FWC.Flipflop.recallSet.setValue(val.getBoolValue());
}, 0, 0);
diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas
index 76acb10f..bdd332cb 100644
--- a/Nasal/FMGC/FMGC-b.nas
+++ b/Nasal/FMGC/FMGC-b.nas
@@ -173,7 +173,7 @@ var Custom = {
spdManaged: props.globals.getNode("/it-autoflight/input/spd-managed", 1),
},
Output: {
- fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
+ fmaPower: 0,
vsFCU: props.globals.initNode("/it-autoflight/output/vs-fcu-display", "", "STRING"),
},
Sound: {
@@ -229,7 +229,7 @@ var ITAF = {
Text.lat.setValue(" ");
Text.vert.setValue(" ");
Custom.showHdg.setBoolValue(1);
- Custom.Output.fmaPower.setBoolValue(1);
+ Custom.Output.fmaPower = 1;
ManagedSPD.stop();
loopTimer.start();
slowLoopTimer.start();
@@ -448,8 +448,8 @@ var ITAF = {
ap1Master: func(s) {
if (s == 1) {
if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and fbw.FBW.apOff == 0 and Position.gearAglFt.getValue() >= 100) {
- me.revertBasicMode();
Output.ap1.setBoolValue(1);
+ me.updateFma();
Output.latTemp = Output.lat.getValue();
if (Output.ap2.getBoolValue() and !Output.apprArm.getBoolValue() and Output.latTemp != 2 and Output.latTemp != 4) {
me.ap2Master(0);
@@ -465,12 +465,13 @@ var ITAF = {
if (Input.ap1.getBoolValue() != Output.ap1Temp) {
Input.ap1.setBoolValue(Output.ap1Temp);
}
+ fmaAp();
},
ap2Master: func(s) {
if (s == 1) {
if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and fbw.FBW.apOff == 0 and Position.gearAglFt.getValue() >= 100) {
- me.revertBasicMode();
Output.ap2.setBoolValue(1);
+ me.updateFma();
Output.latTemp = Output.lat.getValue();
if (Output.ap1.getBoolValue() and !Output.apprArm.getBoolValue() and Output.latTemp != 2 and Output.latTemp != 4) {
me.ap1Master(0);
@@ -486,6 +487,7 @@ var ITAF = {
if (Input.ap2.getBoolValue() != Output.ap2Temp) {
Input.ap2.setBoolValue(Output.ap2Temp);
}
+ fmaAp();
},
apOffFunction: func() {
if (!Output.ap1.getBoolValue() and !Output.ap2.getBoolValue()) { # Only do if both APs are off
@@ -515,6 +517,7 @@ var ITAF = {
if (Input.athr.getBoolValue() != Output.athrTemp) {
Input.athr.setBoolValue(Output.athrTemp);
}
+ fmaAthr();
},
fd1Master: func(s) {
if (s == 1) {
@@ -530,6 +533,7 @@ var ITAF = {
if (Input.fd1.getBoolValue() != Output.fd1Temp) {
Input.fd1.setBoolValue(Output.fd1Temp);
}
+ fmaFd();
},
fd2Master: func(s) {
if (s == 1) {
@@ -545,6 +549,7 @@ var ITAF = {
if (Input.fd2.getBoolValue() != Output.fd2Temp) {
Input.fd2.setBoolValue(Output.fd2Temp);
}
+ fmaFd();
},
setLatMode: func(n) {
Output.vertTemp = Output.vert.getValue();
@@ -596,7 +601,9 @@ var ITAF = {
Text.lat.setValue("T/O");
me.armTextCheck();
} else if (n == 9) { # NONE
+ Output.lnavArm.setBoolValue(0);
Output.locArm.setBoolValue(0);
+ Output.apprArm.setBoolValue(0);
Output.lat.setValue(9);
Custom.showHdg.setBoolValue(1);
Text.lat.setValue(" ");
@@ -882,9 +889,10 @@ var ITAF = {
me.setLatMode(9);
me.setVertMode(9);
me.setLatArm(0);
- Custom.Output.fmaPower.setBoolValue(0);
+ Custom.Output.fmaPower = 0;
} else {
- Custom.Output.fmaPower.setBoolValue(1);
+ if (!Custom.Output.fmaPower) showAllBoxes();
+ Custom.Output.fmaPower = 1;
me.revertBasicMode();
}
},
diff --git a/Nasal/FMGC/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas
index f47947ab..b918532f 100644
--- a/Nasal/FMGC/FMGC-c.nas
+++ b/Nasal/FMGC/FMGC-c.nas
@@ -513,7 +513,7 @@ setlistener("/it-autoflight/output/appr-armed", func {
});
# AP
-var ap = func {
+var fmaAp = func {
ap1 = Output.ap1.getValue();
ap2 = Output.ap2.getValue();
newap = Modes.PFD.FMA.apMode.getValue();
@@ -529,7 +529,7 @@ var ap = func {
}
# FD
-var fd = func {
+var fmaFd = func {
fd1 = Output.fd1.getValue();
fd2 = Output.fd2.getValue();
newfd = Modes.PFD.FMA.fdMode.getValue();
@@ -544,8 +544,8 @@ var fd = func {
}
}
-# AT
-var atMode = func {
+# A/THR
+var fmaAthr = func {
at = Output.athr.getValue();
if (at and Modes.PFD.FMA.athrMode.getValue() != "A/THR") {
Modes.PFD.FMA.athrMode.setValue("A/THR");
@@ -554,14 +554,7 @@ var atMode = func {
}
}
-var boxchk = func {
- if ((Output.ap1.getValue() or Output.ap2.getValue() or Output.fd1.getValue() or Output.fd2.getValue()) and !Custom.Output.fmaPower.getValue()) {
- Input.lat.setValue(3);
- boxchk_b();
- }
-}
-
-var boxchk_b = func {
+var showAllBoxes = func {
if (Modes.PFD.FMA.rollMode.getValue() != " ") {
Modes.PFD.FMA.rollModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
@@ -579,27 +572,6 @@ var boxchk_b = func {
}
}
-# Update AP FD ATHR
-setlistener("/it-autoflight/output/ap1", func {
- ap();
- boxchk();
-});
-setlistener("/it-autoflight/output/ap2", func {
- ap();
- boxchk();
-});
-setlistener("/it-autoflight/output/fd1", func {
- fd();
- boxchk();
-});
-setlistener("/it-autoflight/output/fd2", func {
- fd();
- boxchk();
-});
-setlistener("/it-autoflight/output/athr", func {
- atMode();
-});
-
# Boxes
setlistener("/modes/pfd/fma/ap-mode", func {
if (Modes.PFD.FMA.apMode.getValue() != " ") {
diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas
index 7ca79fe1..00760980 100644
--- a/Nasal/FMGC/FMGC.nas
+++ b/Nasal/FMGC/FMGC.nas
@@ -4,11 +4,6 @@
##################
# Init Functions #
##################
-
-var database1 = 0;
-var database2 = 0;
-var code1 = 0;
-var code2 = 0;
var gear0 = 0;
var state1 = 0;
var state2 = 0;
@@ -19,8 +14,6 @@ var n1_right = 0;
var modelat = "";
var mode = 0;
var gs = 0;
-var cruiseft = 0;
-var cruiseft_b = 0;
var state1 = 0;
var state2 = 0;
var accel_agl_ft = 0;
@@ -32,8 +25,6 @@ var alt = 0;
var altitude = 0;
var flap = 0;
var flaps = 0;
-var ias = 0;
-var mach = 0;
var ktsmach = 0;
var kts_sel = 0;
var mach_sel = 0;
@@ -51,7 +42,6 @@ var tempOverspeed = nil;
setprop("/position/gear-agl-ft", 0);
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
-setprop("/it-autoflight/output/fma-pwr", 0);
setprop("/instrumentation/nav[0]/nav-id", "XXX");
setprop("/instrumentation/nav[1]/nav-id", "XXX");
@@ -71,14 +61,13 @@ var FMGCinit = func {
FMGCInternal.mngSpdCmd = 157;
FMGCInternal.mngKtsMach = 0;
FMGCInternal.machSwitchover = 0;
- setprop("/FMGC/internal/loc-source", "NAV0");
setprop("/FMGC/internal/optalt", 0);
- setprop("/FMGC/internal/landing-time", -99);
+ FMGCInternal.landingTime = -99;
+ FMGCInternal.blockFuelTime = -99;
+ FMGCInternal.fuelPredTime = -99;
FMGCAlignTime[0].setValue(-99);
FMGCAlignTime[1].setValue(-99);
FMGCAlignTime[2].setValue(-99);
- setprop("/FMGC/internal/block-fuel-time", -99);
- setprop("/FMGC/internal/fuel-pred-time", -99);
masterFMGC.start();
radios.start();
}
@@ -88,6 +77,12 @@ var FMGCInternal = {
phase: 0,
minspeed: 0,
maxspeed: 0,
+ clbSpdLim: 250,
+ desSpdLim: 250,
+ clbSpdLimAlt: 10000,
+ desSpdLimAlt: 10000,
+ clbSpdLimSet: 0,
+ desSpdLimSet: 0,
takeoffState: 0,
# speeds
@@ -222,6 +217,11 @@ var FMGCInternal = {
mngSpd: 0,
mngSpdCmd: 0,
+ # This can't be init to -98, because we don't want it to run until WOW has gone to false and back to true
+ landingTime: -98,
+ blockFuelTime: -99,
+ fuelPredTime: -99,
+
# RADNAV
ADF1: {
freqSet: 0,
@@ -258,9 +258,12 @@ var postInit = func() {
var FMGCNodes = {
costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"),
+ decel: props.globals.initNode("/FMGC/internal/decel", 0, "BOOL"),
flexSet: props.globals.initNode("/FMGC/internal/flex-set", 0, "BOOL"),
flexTemp: props.globals.initNode("/FMGC/internal/flex", 0, "INT"),
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
+ ktsToMachFactor: props.globals.getNode("/FMGC/internal/kts-to-mach-factor"),
+ machToKtsFactor: props.globals.getNode("/FMGC/internal/mach-to-kts-factor"),
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
@@ -339,11 +342,8 @@ var updateFuel = func {
final_fuel = 1000 * FMGCInternal.finalFuel;
zfw = 1000 * FMGCInternal.zfw;
final_time = final_fuel / (2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903)); # x2 for 2 engines
- if (final_time < 0) {
- final_time = 0;
- } elsif (final_time > 480) {
- final_time = 480;
- }
+ final_time = math.clamp(final_time, 0, 480);
+
if (num(final_time) >= 60) {
final_min = int(math.mod(final_time, 60));
final_hour = int((final_time - final_min) / 60);
@@ -361,11 +361,8 @@ var updateFuel = func {
}
zfw = 1000 * FMGCInternal.zfw;
final_fuel = final_time * 2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903); # x2 for 2 engines
- if (final_fuel < 0) {
- final_fuel = 0;
- } elsif (final_fuel > 80000) {
- final_fuel = 80000;
- }
+ final_fuel = math.clamp(final_fuel, 0, 80000);
+
FMGCInternal.finalFuel = final_fuel / 1000;
}
@@ -377,11 +374,8 @@ var updateFuel = func {
alt_fuel = 1000 * num(FMGCInternal.altFuel);
zfw = 1000 * FMGCInternal.zfw;
alt_time = alt_fuel / (2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903)); # x2 for 2 engines
- if (alt_time < 0) {
- alt_time = 0;
- } elsif (alt_time > 480) {
- alt_time = 480;
- }
+ alt_time = math.clamp(alt_time, 0, 480);
+
if (num(alt_time) >= 60) {
alt_min = int(math.mod(alt_time, 60));
alt_hour = int((alt_time - alt_min) / 60);
@@ -418,21 +412,14 @@ var updateFuel = func {
#trip_fuel = 4.003e+02 + (dist * -5.399e+01) + (dist * dist * -7.322e-02) + (dist * dist * dist * 1.091e-05) + (dist * dist * dist * dist * 2.962e-10) + (dist * dist * dist * dist * dist * -1.178e-13) + (dist * dist * dist * dist * dist * dist * 6.322e-18) + (crz * 5.387e+01) + (dist * crz * 1.583e+00) + (dist * dist * crz * 7.695e-04) + (dist * dist * dist * crz * -1.057e-07) + (dist * dist * dist * dist * crz * 1.138e-12) + (dist * dist * dist * dist * dist * crz * 1.736e-16) + (crz * crz * -1.171e+00) + (dist * crz * crz * -1.219e-02) + (dist * dist * crz * crz * -2.879e-06) + (dist * dist * dist * crz * crz * 3.115e-10) + (dist * dist * dist * dist * crz * crz * -4.093e-15) + (crz * crz * crz * 9.160e-03) + (dist * crz * crz * crz * 4.311e-05) + (dist * dist * crz * crz * crz * 4.532e-09) + (dist * dist * dist * crz * crz * crz * -2.879e-13) + (crz * crz * crz * crz * -3.338e-05) + (dist * crz * crz * crz * crz * -7.340e-08) + (dist * dist * crz * crz * crz * crz * -2.494e-12) + (crz * crz * crz * crz * crz * 5.849e-08) + (dist * crz * crz * crz * crz * crz * 4.898e-11) + (crz * crz * crz * crz * crz * crz * -3.999e-11);
trip_fuel = 4.018e+02 + (dist*3.575e+01) + (dist*dist*-4.260e-02) + (dist*dist*dist*-1.446e-05) + (dist*dist*dist*dist*4.101e-09) + (dist*dist*dist*dist*dist*-6.753e-13) + (dist*dist*dist*dist*dist*dist*5.074e-17) + (crz*-2.573e+01) + (dist*crz*-1.583e-01) + (dist*dist*crz*8.147e-04) + (dist*dist*dist*crz*4.485e-08) + (dist*dist*dist*dist*crz*-7.656e-12) + (dist*dist*dist*dist*dist*crz*4.503e-16) + (crz*crz*4.427e-01) + (dist*crz*crz*-1.137e-03) + (dist*dist*crz*crz*-4.409e-06) + (dist*dist*dist*crz*crz*-3.345e-11) + (dist*dist*dist*dist*crz*crz*4.985e-15) + (crz*crz*crz*-2.471e-03) + (dist*crz*crz*crz*1.223e-05) + (dist*dist*crz*crz*crz*9.660e-09) + (dist*dist*dist*crz*crz*crz*-2.127e-14) + (crz*crz*crz*crz*5.714e-06) + (dist*crz*crz*crz*crz*-3.546e-08) + (dist*dist*crz*crz*crz*crz*-7.536e-12) + (crz*crz*crz*crz*crz*-4.061e-09) + (dist*crz*crz*crz*crz*crz*3.355e-11) + (crz*crz*crz*crz*crz*crz*-1.451e-12);
- if (trip_fuel < 400) {
- trip_fuel = 400;
- } elsif (trip_fuel > 80000) {
- trip_fuel = 80000;
- }
+ trip_fuel = math.clamp(trip_fuel, 400, 80000);
# cruize temp correction
trip_fuel = trip_fuel + (0.033 * (temp - 15 + (2 * crz / 10)) * flightPlanController.arrivalDist);
trip_time = 9.095e-02 + (dist*-3.968e-02) + (dist*dist*4.302e-04) + (dist*dist*dist*2.005e-07) + (dist*dist*dist*dist*-6.876e-11) + (dist*dist*dist*dist*dist*1.432e-14) + (dist*dist*dist*dist*dist*dist*-1.177e-18) + (crz*7.348e-01) + (dist*crz*3.310e-03) + (dist*dist*crz*-8.700e-06) + (dist*dist*dist*crz*-4.214e-10) + (dist*dist*dist*dist*crz*5.652e-14) + (dist*dist*dist*dist*dist*crz*-6.379e-18) + (crz*crz*-1.449e-02) + (dist*crz*crz*-7.508e-06) + (dist*dist*crz*crz*4.529e-08) + (dist*dist*dist*crz*crz*3.699e-13) + (dist*dist*dist*dist*crz*crz*8.466e-18) + (crz*crz*crz*1.108e-04) + (dist*crz*crz*crz*-4.126e-08) + (dist*dist*crz*crz*crz*-9.645e-11) + (dist*dist*dist*crz*crz*crz*-1.544e-16) + (crz*crz*crz*crz*-4.123e-07) + (dist*crz*crz*crz*crz*1.831e-10) + (dist*dist*crz*crz*crz*crz*7.438e-14) + (crz*crz*crz*crz*crz*7.546e-10) + (dist*crz*crz*crz*crz*crz*-1.921e-13) + (crz*crz*crz*crz*crz*crz*-5.453e-13);
- if (trip_time < 10) {
- trip_time = 10;
- } elsif (trip_time > 480) {
- trip_time = 480;
- }
+ trip_time = math.clamp(trip_time, 10, 480);
+
# if (low air conditioning) {
# trip_fuel = trip_fuel * 0.995;
#}
@@ -445,11 +432,7 @@ var updateFuel = func {
zfw = FMGCInternal.zfw;
landing_weight_correction = 9.951e+00 + (dist*-2.064e+00) + (dist*dist*2.030e-03) + (dist*dist*dist*8.179e-08) + (dist*dist*dist*dist*-3.941e-11) + (dist*dist*dist*dist*dist*2.443e-15) + (crz*2.771e+00) + (dist*crz*3.067e-02) + (dist*dist*crz*-1.861e-05) + (dist*dist*dist*crz*2.516e-10) + (dist*dist*dist*dist*crz*5.452e-14) + (crz*crz*-4.483e-02) + (dist*crz*crz*-1.645e-04) + (dist*dist*crz*crz*5.212e-08) + (dist*dist*dist*crz*crz*-8.721e-13) + (crz*crz*crz*2.609e-04) + (dist*crz*crz*crz*3.898e-07) + (dist*dist*crz*crz*crz*-4.617e-11) + (crz*crz*crz*crz*-6.488e-07) + (dist*crz*crz*crz*crz*-3.390e-10) + (crz*crz*crz*crz*crz*5.835e-10);
trip_fuel = trip_fuel + (landing_weight_correction * (FMGCInternal.lw * 1000 - 121254.24421) / 2204.622622);
- if (trip_fuel < 400) {
- trip_fuel = 400;
- } elsif (trip_fuel > 80000) {
- trip_fuel = 80000;
- }
+ trip_fuel = math.clamp(trip_fuel, 400, 80000);
FMGCInternal.tripFuel = trip_fuel / 1000;
if (num(trip_time) >= 60) {
@@ -503,11 +486,8 @@ var updateFuel = func {
FMGCInternal.extraFuel = extra_fuel / 1000;
lw = 1000 * FMGCInternal.lw;
extra_time = extra_fuel / (2.0 * ((lw*lw*-2e-10) + (lw*0.0003) + 2.8903)); # x2 for 2 engines
- if (extra_time < 0) {
- extra_time = 0;
- } elsif (extra_time > 480) {
- extra_time = 480;
- }
+ extra_time = math.clamp(extra_time, 0, 480);
+
if (num(extra_time) >= 60) {
extra_min = int(math.mod(extra_time, 60));
extra_hour = int((extra_time - extra_min) / 60);
@@ -589,8 +569,6 @@ var masterFMGC = maketimer(0.2, func {
mode = Modes.PFD.FMA.pitchMode.getValue();
gs = pts.Velocities.groundspeed.getValue();
alt = pts.Instrumentation.Altimeter.indicatedFt.getValue();
- # cruiseft = FMGCInternal.crzFt;
- # cruiseft_b = FMGCInternal.crzFt - 200;
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
accel_agl_ft = Setting.reducAglFt.getValue();
@@ -632,7 +610,7 @@ var masterFMGC = maketimer(0.2, func {
}
}
} elsif (FMGCInternal.phase == 4) {
- if (getprop("/FMGC/internal/decel")) {
+ if (FMGCNodes.decel.getValue()) {
newphase = 5;
}
} elsif (FMGCInternal.phase == 5) {
@@ -649,9 +627,9 @@ var masterFMGC = maketimer(0.2, func {
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and
flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint
- setprop("/FMGC/internal/decel", 1);
- } elsif (getprop("/FMGC/internal/decel") == 1 and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) {
- setprop("/FMGC/internal/decel", 0);
+ FMGCNodes.decel.setValue(1);
+ } elsif (FMGCNodes.decel.getValue() and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) {
+ FMGCNodes.decel.setValue(0);
}
@@ -730,6 +708,7 @@ var masterFMGC = maketimer(0.2, func {
if (altitude > 20000) {
FMGCInternal.clean += (altitude - 20000) / 1000;
}
+
FMGCInternal.vs1g_clean = 0.0024 * weight_lbs * weight_lbs + 0.124 * weight_lbs + 88.942;
FMGCInternal.vs1g_conf_1 = -0.0007 * weight_lbs * weight_lbs + 0.6795 * weight_lbs + 44.673;
FMGCInternal.vs1g_conf_1f = -0.0001 * weight_lbs * weight_lbs + 0.5211 * weight_lbs + 49.027;
@@ -740,13 +719,11 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.flap2 = FMGCInternal.vs1g_conf_2 * 1.47;
FMGCInternal.flap3 = FMGCInternal.vs1g_conf_3 * 1.36;
if (FMGCInternal.ldgConfig3) {
- FMGCInternal.vls = FMGCInternal.vs1g_conf_3 * 1.23;
+ FMGCInternal.vls = math.clamp(FMGCInternal.vs1g_conf_3 * 1.23, 113, 999);
} else {
- FMGCInternal.vls = FMGCInternal.vs1g_conf_full * 1.23
- }
- if (FMGCInternal.vls < 113) {
- FMGCInternal.vls = 113;
+ FMGCInternal.vls = math.clamp(FMGCInternal.vs1g_conf_full * 1.23, 113, 999);
}
+
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp = FMGCInternal.vls + 5;
@@ -918,18 +895,16 @@ var masterFMGC = maketimer(0.2, func {
############################
#handle radios, runways, v1/vr/v2
############################
-var airportRadiosPhase = nil;
var updateAirportRadios = func {
-
- airportRadiosPhase = FMGCInternal.phase;
-
departure_rwy = fmgc.flightPlanController.flightplans[2].departure_runway;
destination_rwy = fmgc.flightPlanController.flightplans[2].destination_runway;
- if (airportRadiosPhase >= 2 and destination_rwy != nil) {
+
+ if (FMGCInternal.phase >= 2 and destination_rwy != nil) {
var airport = airportinfo(FMGCInternal.arrApt);
setprop("/FMGC/internal/ldg-elev", airport.elevation * M2FT); # eventually should be runway elevation
- magnetic_hdg = geo.normdeg(destination_rwy.heading - getprop("/environment/magnetic-variation-deg"));
+ magnetic_hdg = geo.normdeg(destination_rwy.heading - pts.Environment.magVar.getValue());
runway_ils = destination_rwy.ils_frequency_mhz;
+
if (runway_ils != nil and !fmgc.FMGCInternal.ILS.freqSet and !fmgc.FMGCInternal.ILS.crsSet) {
fmgc.FMGCInternal.ILS.freqCalculated = runway_ils;
pts.Instrumentation.Nav.Frequencies.selectedMhz[0].setValue(runway_ils);
@@ -940,9 +915,10 @@ var updateAirportRadios = func {
} elsif (!fmgc.FMGCInternal.ILS.crsSet) {
pts.Instrumentation.Nav.Radials.selectedDeg[0].setValue(magnetic_hdg);
}
- } elsif (airportRadiosPhase <= 1 and departure_rwy != nil) {
- magnetic_hdg = geo.normdeg(departure_rwy.heading - getprop("/environment/magnetic-variation-deg"));
+ } elsif (FMGCInternal.phase <= 1 and departure_rwy != nil) {
+ magnetic_hdg = geo.normdeg(departure_rwy.heading - pts.Environment.magVar.getValue());
runway_ils = departure_rwy.ils_frequency_mhz;
+
if (runway_ils != nil and !fmgc.FMGCInternal.ILS.freqSet and !fmgc.FMGCInternal.ILS.crsSet) {
fmgc.FMGCInternal.ILS.freqCalculated = runway_ils;
pts.Instrumentation.Nav.Frequencies.selectedMhz[0].setValue(runway_ils);
@@ -957,8 +933,8 @@ var updateAirportRadios = func {
};
-setlistener(FMGCNodes.phase, updateAirportRadios,0,0);
-setlistener(flightPlanController.changed, updateAirportRadios,0,0);
+setlistener(FMGCNodes.phase, updateAirportRadios, 0, 0);
+setlistener(flightPlanController.changed, updateAirportRadios, 0, 0);
var reset_FMGC = func {
FMGCInternal.phase = 0;
@@ -1009,110 +985,76 @@ var reset_FMGC = func {
#################
# Managed Speed #
#################
+var srsSpeedNode = props.globals.getNode("/it-autoflight/settings/togaspd", 1);
+var ktToMach = func(val) { return val * FMGCNodes.ktsToMachFactor.getValue(); }
+var machToKt = func(val) { return val * FMGCNodes.machToKtsFactor.getValue(); }
+
var ManagedSPD = maketimer(0.25, func {
if (FMGCInternal.crzSet and FMGCInternal.costIndexSet) {
if (Custom.Input.spdManaged.getBoolValue()) {
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
- mode = Modes.PFD.FMA.pitchMode.getValue();
- ias = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue();
- mach = pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue();
+ decel = FMGCNodes.decel.getValue();
ktsmach = Input.ktsMach.getValue();
- kts_sel = Input.kts.getValue();
- mach_sel = Input.mach.getValue();
- srsSPD = getprop("/it-autoflight/settings/togaspd");
- phase = FMGCInternal.phase; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
- flap = pts.Controls.Flight.flapsPos.getValue();
- decel = getprop("/FMGC/internal/decel");
+ mode = Modes.PFD.FMA.pitchMode.getValue();
+ srsSPD = srsSpeedNode.getValue();
mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1);
mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001);
- if (mach > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) {
+ # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
+ if (pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue() > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) {
FMGCInternal.machSwitchover = 1;
- } elsif (ias > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) {
+ } elsif (pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue() > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) {
FMGCInternal.machSwitchover = 0;
}
if ((mode == " " or mode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) {
- if (FMGCInternal.mngKtsMach) {
+ FMGCInternal.mngKtsMach = 0;
+ FMGCInternal.mngSpdCmd = srsSPD;
+ } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= FMGCInternal.clbSpdLimAlt) {
+ # Speed is maximum of greendot / climb speed limit
+ FMGCInternal.mngKtsMach = 0;
+ FMGCInternal.mngSpdCmd = decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.clbSpdLim, FMGCInternal.clean, 999);
+ } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) {
+ FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0;
+ FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd;
+ } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) {
+ if (decel) {
FMGCInternal.mngKtsMach = 0;
- }
- if (FMGCInternal.mngSpdCmd != srsSPD) {
- FMGCInternal.mngSpdCmd = srsSPD;
- }
- } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= 10050) {
- if (FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 0;
- }
- if (FMGCInternal.mngSpdCmd != 250 and !decel) {
- FMGCInternal.mngSpdCmd = 250;
- } elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
- FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
- }
- } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !FMGCInternal.machSwitchover) {
- if (FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 0;
- }
- if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
- FMGCInternal.mngSpdCmd = mng_alt_spd;
- }
- } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and FMGCInternal.machSwitchover) {
- if (!FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 1;
- }
- if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
- FMGCInternal.mngSpdCmd = mng_alt_mach;
- }
- } elsif (FMGCInternal.phase == 4 and altitude > 11000 and !FMGCInternal.machSwitchover) {
- if (FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 0;
- }
- if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
- FMGCInternal.mngSpdCmd = mng_alt_spd;
- }
- } elsif (FMGCInternal.phase == 4 and altitude > 11000 and FMGCInternal.machSwitchover) {
- if (!FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 1;
- }
- if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
- FMGCInternal.mngSpdCmd = mng_alt_mach;
- }
- } elsif ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !FMGCInternal.machSwitchover) {
- if (FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 0;
- }
- if (FMGCInternal.mngSpdCmd != mng_alt_spd and !decel) {
- FMGCInternal.mngSpdCmd = mng_alt_spd;
- } elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
- FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
- }
- } elsif ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude <= 10980) {
- if (FMGCInternal.mngKtsMach) {
- FMGCInternal.mngKtsMach = 0;
- }
- if (FMGCInternal.mngSpdCmd != 250 and !decel) {
- FMGCInternal.mngSpdCmd = 250;
- } elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
+ } else {
+ FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0;
+ FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd;
}
+ } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude <= FMGCInternal.desSpdLimAlt) {
+ FMGCInternal.mngKtsMach = 0;
+ # Speed is maximum of greendot / descent speed limit
+ FMGCInternal.mngSpdCmd = decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999);
}
- if (FMGCInternal.mngSpdCmd > FMGCInternal.maxspeed - 5) {
- FMGCInternal.mngSpd = (FMGCInternal.maxspeed - 5);
+ # Clamp to minspeed, maxspeed
+ if (FMGCInternal.phase >= 2) {
+ if (!FMGCInternal.mngKtsMach) {
+ FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, FMGCInternal.minspeed, FMGCInternal.maxspeed);
+ } else {
+ FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, ktToMach(FMGCInternal.minspeed), ktToMach(FMGCInternal.maxspeed));
+ }
} else {
FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd;
}
+ # Update value of ktsMach
if (ktsmach and !FMGCInternal.mngKtsMach) {
Input.ktsMach.setValue(0);
} elsif (!ktsmach and FMGCInternal.mngKtsMach) {
Input.ktsMach.setValue(1);
}
- if (kts_sel != FMGCInternal.mngSpd and !ktsmach) {
+ # Set target speed
+ if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach) {
Input.kts.setValue(FMGCInternal.mngSpd);
- } elsif (mach_sel != FMGCInternal.mngSpd and ktsmach) {
+ } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) {
Input.mach.setValue(FMGCInternal.mngSpd);
}
} else {
@@ -1124,27 +1066,35 @@ var ManagedSPD = maketimer(0.25, func {
}
});
+# Nav Database
+var navDataBase = {
+ currentCode: "AB20170101",
+ currentDate: "01JAN-28JAN",
+ standbyCode: "AB20170102",
+ standbyDate: "29JAN-26FEB",
+};
+
+var tempStoreCode = nil;
+var tempStoreDate = nil;
var switchDatabase = func {
- database1 = getprop("/FMGC/internal/navdatabase");
- database2 = getprop("/FMGC/internal/navdatabase2");
- code1 = getprop("/FMGC/internal/navdatabasecode");
- code2 = getprop("/FMGC/internal/navdatabasecode2");
- setprop("/FMGC/internal/navdatabase", database2);
- setprop("/FMGC/internal/navdatabase2", database1);
- setprop("/FMGC/internal/navdatabasecode", code2);
- setprop("/FMGC/internal/navdatabasecode2", code1);
+ tempStoreCode = navDataBase.currentCode;
+ tempStoreDate = navDataBase.currentDate;
+ navDataBase.currentCode = navDataBase.standbyCode;
+ navDataBase.currentDate = navDataBase.standbyDate;
+ navDataBase.standbyCode = tempStoreCode;
+ navDataBase.standbyDate = tempStoreDate;
}
# Landing to phase 7
-setlistener("/gear/gear[1]/wow", func() {
- if (getprop("/gear/gear[1]/wow") == 0 and timer30secLanding.isRunning) {
+setlistener("/gear/gear[1]/wow", func(val) {
+ if (val.getValue() == 0 and timer30secLanding.isRunning) {
timer30secLanding.stop();
- setprop("/FMGC/internal/landing-time", -99);
+ FMGCInternal.landingTime = -99;
}
- if (pts.Gear.wow[1].getValue() and getprop("/FMGC/internal/landing-time") == -99) {
+ if (val.getValue() and FMGCInternal.landingTime == -99) {
timer30secLanding.start();
- setprop("/FMGC/internal/landing-time", pts.Sim.Time.elapsedSec.getValue());
+ FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue();
}
}, 0, 0);
@@ -1187,42 +1137,41 @@ setlistener("/systems/navigation/adr/operating-3", func() {
# Calculate Block Fuel
setlistener("/FMGC/internal/block-calculating", func() {
if (timer3blockFuel.isRunning) {
- setprop("/FMGC/internal/block-fuel-time", -99);
- timer3blockFuel.start();
- setprop("/FMGC/internal/block-fuel-time", pts.Sim.Time.elapsedSec.getValue());
+ FMGCInternal.blockFuelTime = -99;
+ timer3blockFuel.stop();
}
- if (getprop("/FMGC/internal/block-fuel-time") == -99) {
+ if (FMGCInternal.blockFuelTime == -99) {
timer3blockFuel.start();
- setprop("/FMGC/internal/block-fuel-time", pts.Sim.Time.elapsedSec.getValue());
+ FMGCInternal.blockFuelTime = pts.Sim.Time.elapsedSec.getValue();
}
}, 0, 0);
# Calculate Fuel Prediction
setlistener("/FMGC/internal/fuel-calculating", func() {
if (timer5fuelPred.isRunning) {
- setprop("/FMGC/internal/fuel-pred-time", -99);
- timer5fuelPred.start();
- setprop("/FMGC/internal/fuel-pred-time", pts.Sim.Time.elapsedSec.getValue());
+ FMGCInternal.fuelPredTime = -99;
+ timer5fuelPred.stop();
}
- if (getprop("/FMGC/internal/fuel-pred-time") == -99) {
+ if (FMGCInternal.fuelPredTime == -99) {
timer5fuelPred.start();
- setprop("/FMGC/internal/fuel-pred-time", pts.Sim.Time.elapsedSec.getValue());
+ FMGCInternal.fuelPredTime = pts.Sim.Time.elapsedSec.getValue();
}
}, 0, 0);
# Maketimers
var timer30secLanding = maketimer(1, func() {
- if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/landing-time") + 30) {
+ if (pts.Sim.Time.elapsedSec.getValue() > (FMGCInternal.landingTime + 30)) {
FMGCInternal.phase = 7;
+ FMGCNodes.phase.setValue(7);
if (FMGCInternal.costIndexSet) {
setprop("/FMGC/internal/last-cost-index", FMGCInternal.costIndex);
} else {
setprop("/FMGC/internal/last-cost-index", 0);
}
- setprop("/FMGC/internal/landing-time", -99);
+ FMGCInternal.landingTime = -99;
timer30secLanding.stop();
}
});
@@ -1252,21 +1201,21 @@ var timer48gpsAlign3 = maketimer(1, func() {
});
var timer3blockFuel = maketimer(1, func() {
- if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) {
+ if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.blockFuelTime + 3) {
#updateFuel();
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
- setprop("/FMGC/internal/block-fuel-time", -99);
+ FMGCInternal.blockFuelTime = -99;
timer3blockFuel.stop();
}
});
var timer5fuelPred = maketimer(1, func() {
- if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/fuel-pred-time") + 5) {
+ if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.fuelPredTime + 5) {
#updateFuel();
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
- setprop("/FMGC/internal/fuel-pred-time", -99);
+ FMGCInternal.fuelPredTime = -99;
timer5fuelPred.stop();
}
});
\ No newline at end of file
diff --git a/Nasal/FMGC/SimbriefParser.nas b/Nasal/FMGC/SimbriefParser.nas
index 6312b49c..b215dc29 100644
--- a/Nasal/FMGC/SimbriefParser.nas
+++ b/Nasal/FMGC/SimbriefParser.nas
@@ -120,7 +120,6 @@ var SimbriefParser = {
fmgc.updateArptLatLon();
fmgc.updateARPT();
} else {
- me.cleanupInvalid();
return nil;
}
diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas
index a888c3d3..423bc9cf 100644
--- a/Nasal/Libraries/buttons.nas
+++ b/Nasal/Libraries/buttons.nas
@@ -24,7 +24,7 @@ var variousReset = func() {
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0);
setprop("/controls/switches/cabinCall", 0);
setprop("/controls/switches/mechCall", 0);
- libraries.emerLtsSwitch.setValue(0.5);
+ pts.Controls.Switches.emerLtsSwitch.setValue(0.5);
# cockpit voice recorder stuff
setprop("/controls/CVR/power", 0);
setprop("/controls/CVR/test", 0);
@@ -61,9 +61,9 @@ var variousReset = func() {
setprop("/modes/fcu/hdg-time", -45);
setprop("/controls/navigation/switching/att-hdg", 0);
setprop("/controls/navigation/switching/air-data", 0);
- libraries.noSmokingSwitch.setValue(0.0);
- libraries.seatbeltSwitch.setValue(0.0);
- libraries.emerLtsSwitch.setValue(0.0);
+ pts.Controls.Switches.noSmokingSwitch.setValue(0);
+ pts.Controls.Switches.seatbeltSwitch.setValue(0);
+ pts.Controls.Switches.emerLtsSwitch.setValue(0);
}
var BUTTONS = {
diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas
index f5014294..fbe52f13 100644
--- a/Nasal/Libraries/libraries.nas
+++ b/Nasal/Libraries/libraries.nas
@@ -64,13 +64,17 @@ var cargofwd = aircraft.door.new("/sim/model/door-positions/cargofwd", 10);
# Seat armrests in the flight deck (unused)
var armrests = aircraft.door.new("/sim/model/door-positions/armrests", 2);
+# Cockpit door - TODO animation
+var cockpitdoor = aircraft.door.new("/sim/model/door-positions/doorc", 1);
+setprop("/sim/model/door-positions/doorc/lock-status",0);
+
# door opener/closer
var triggerDoor = func(door, doorName, doorDesc) {
if (getprop("/sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) {
gui.popupTip("Closing " ~ doorDesc ~ " door");
door.toggle();
} else {
- if (getprop("/velocities/groundspeed-kt") > 5) {
+ if (pts.Velocities.groundspeed.getValue() > 5) {
gui.popupTip("You cannot open the doors while the aircraft is moving!");
} else {
gui.popupTip("Opening " ~ doorDesc ~ " door");
@@ -79,6 +83,25 @@ var triggerDoor = func(door, doorName, doorDesc) {
}
};
+setlistener("/controls/doors/doorc-switch",func(a){
+ setprop("sim/sounde/switch1", 1);
+ if (systems.ELEC.Bus.dc1.getValue() > 25 or systems.ELEC.Bus.dc2.getValue() > 25) {
+ var pos = a.getValue();
+ var current = getprop("/sim/model/door-positions/doorc/lock-status");
+ if (pos == 1 and current == 0) { ## LOCK
+ settimer( func {
+ if (a.getValue() == pos) setprop("/sim/model/door-positions/doorc/lock-status",1);
+ },0.4);
+ }
+ else if (pos == -1 and current == 1) { ## UNLOCK
+ settimer( func {
+ if (a.getValue() == pos) setprop("/sim/model/door-positions/doorc/lock-status",0);
+ },0.3);
+ }
+ #setprop("/sim/model/door-positions/doorc/lock-status",-9); ## FAULT
+ }
+},0,0);
+
###########
# Systems #
###########
@@ -133,48 +156,6 @@ setlistener("/sim/signals/fdm-initialized", func() {
emesary.GlobalTransmitter.Register(A320Libraries);
});
-var collectorTankL = props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs");
-var collectorTankR = props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs");
-var groundAir = props.globals.getNode("/controls/pneumatics/switches/groundair");
-var groundCart = props.globals.getNode("/controls/electrical/ground-cart");
-var chocks = props.globals.getNode("/services/chocks/enable");
-var groundspeed = 0;
-var stateL = 0;
-var stateR = 0;
-
-var seatbeltSwitch = props.globals.getNode("/controls/switches/seatbelt-sign");
-var noSmokingSwitch = props.globals.getNode("/controls/switches/no-smoking-sign");
-var emerLtsSwitch = props.globals.getNode("/controls/switches/emer-lights");
-var seatbeltLight = props.globals.getNode("/controls/lighting/seatbelt-sign");
-var noSmokingLight = props.globals.getNode("/controls/lighting/no-smoking-sign");
-
-var update_items = [
- props.UpdateManager.FromHashValue("seatbelt", nil, func(val) {
- if (val) {
- if (!seatbeltLight.getBoolValue()) {
- seatbeltLight.setValue(1);
- }
- } else {
- if (seatbeltLight.getBoolValue()) {
- seatbeltLight.setValue(0);
- }
- }
- }),
- props.UpdateManager.FromHashList(["noSmoking","gearPosNorm"], nil, func(val) {
- if (val.noSmoking == 1) {
- if (!noSmokingLight.getBoolValue()) {
- noSmokingLight.setBoolValue(1);
- }
- } elsif (val.noSmoking == 0.5 and val.gearPosNorm != 0) { # todo: should be when uplocks not engaged
- if (!noSmokingLight.getBoolValue()) {
- noSmokingLight.setBoolValue(1);
- }
- } else {
- noSmokingLight.setBoolValue(0); # sign stays on in cabin but sound still occurs
- }
- }),
-];
-
var systemsLoop = func(notification) {
if (!systemsInitialized and getprop("/systems/acconfig/mismatch-code") != "0x000") { return; }
systems.PNEU.loop(notification);
@@ -190,66 +171,55 @@ var systemsLoop = func(notification) {
atsu.ATSU.loop();
libraries.BUTTONS.update();
- if ((notification.engine1State == 2 or notification.engine1State == 3) and collectorTankL.getValue() < 1) {
+ if (notification.engine1State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[5].getValue() < 1) {
systems.cutoff_one();
}
- if ((notification.engine2State == 2 or notification.engine2State == 3) and collectorTankR.getValue() < 1) {
- systems.cutoff_two();
- }
- foreach (var update_item; update_items) {
- update_item.update(notification);
+ if (notification.engine2State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[6].getValue() < 1) {
+ systems.cutoff_two();
}
}
# GPWS
var GPWS = {
- inhibitNode: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit"),
- tatcfInhibit: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit"),
- volume: props.globals.getNode("/instrumentation/mk-viii/speaker/volume"),
- flapAllOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override"),
- flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override"),
- flapOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override"),
- alertMode: props.globals.initNode("/instrumentation/mk-viii/outputs/alert-mode",0,"INT"),
+ alertMode: props.globals.initNode("/instrumentation/mk-viii/outputs/alert-mode", 0, "INT"),
+ alert: props.globals.getNode("instrumentation/mk-viii/outputs/discretes/gpws-alert"),
+ warning: props.globals.getNode("instrumentation/mk-viii/outputs/discretes/gpws-warning"),
};
-setlistener("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit", func() {
- if (GPWS.inhibitNode.getBoolValue()) {
- GPWS.volume.setValue(2);
- } else {
- GPWS.volume.setValue(0);
- }
-}, 0, 0);
-
-var updateGPWSFlap = func() {
- if (GPWS.flapAllOverride.getBoolValue() or (GPWS.flap3Override.getBoolValue() and pts.Controls.Flight.flapsPos.getValue() >= 4)) {
- GPWS.flapOverride.setBoolValue(1);
- } else {
- GPWS.flapOverride.setBoolValue(0);
- }
-}
-
-setlistener("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override", func() {
- updateGPWSFlap();
-}, 0, 0);
-
-setlistener("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", func() {
- updateGPWSFlap();
-}, 0, 0);
-
# GPWS alert pooling for get mode change - a little esoteric way but it works
-var gpws_alert_watch = maketimer(0.8,func {
- var alert = 0;
- if (getprop("instrumentation/mk-viii/outputs/discretes/gpws-warning")) alert = 2; # MODE2 - warning - RED
- else if (getprop("instrumentation/mk-viii/outputs/discretes/gpws-alert")) alert = 1; # MODE1 - caution - YELLOW
- if (GPWS.alertMode.getValue()!=alert) GPWS.alertMode.setValue(alert);
+var GPWSAlertStatus = 0;
+var gpws_alert_watch = maketimer(0.8, func() {
+ if (GPWS.warning.getValue()) {
+ GPWSAlertStatus = 2; # MODE2 - warning - RED
+ } else if (GPWS.alert.getValue()) {
+ GPWSAlertStatus = 1; # MODE1 - caution - YELLOW
+ } else {
+ GPWSAlertStatus = 0;
+ }
+
+ if (GPWS.alertMode.getValue() != GPWSAlertStatus) {
+ GPWS.alertMode.setValue(GPWSAlertStatus);
+ }
});
-setlistener("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit", func{ # detect GPWS switch status
- var failure = GPWS.tatcfInhibit.getBoolValue();
- if (!failure) gpws_alert_watch.start();
- else gpws_alert_watch.stop();
-},1,0);
+# detect GPWS switch status
+setlistener("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit", func (val) {
+ if (!val.getBoolValue()) {
+ gpws_alert_watch.start();
+ } else {
+ gpws_alert_watch.stop();
+ }
+}, 1, 0);
+
+# Steep ILS
+setlistener("/options/steep-ils", func(val) {
+ if (val.getValue()) {
+ pts.Instrumentation.MKVII.Inputs.Discretes.steepApproach.setValue(1);
+ } else {
+ pts.Instrumentation.MKVII.Inputs.Discretes.steepApproach.setValue(0);
+ }
+}, 0, 0);
# Replay
var replayState = props.globals.getNode("/sim/replay/replay-state");
@@ -261,15 +231,6 @@ setlistener(replayState, func(v) {
}
}, 0, 0);
-# Steep ILS
-setlistener("/options/steep-ils", func() {
- if (getprop("/options/steep-ils") == 1) {
- setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 1);
- } else {
- setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 0);
- }
-}, 0, 0);
-
# hackCanvas
canvas.Text._lastText = canvas.Text["_lastText"];
canvas.Text.setText = func(text) {
@@ -392,8 +353,6 @@ var LibrariesRecipient =
var input = {
# Libraries
- "seatbelt": "/controls/switches/seatbelt-sign",
- "noSmoking": "/controls/switches/no-smoking-sign",
"gearPosNorm": "/gear/gear[0]/position-norm",
"gearPosNorm1": "/gear/gear[1]/position-norm",
"gearPosNorm2": "/gear/gear[2]/position-norm",
@@ -407,8 +366,8 @@ foreach (var name; keys(input)) {
# TODO split EFIS altimeters
var newinhg = nil;
-setlistener("/instrumentation/altimeter/setting-inhg", func() {
- newinhg = getprop("/instrumentation/altimeter/setting-inhg");
+setlistener("/instrumentation/altimeter/setting-inhg", func(val) {
+ newinhg = val.getValue();
setprop("/instrumentation/altimeter[1]/setting-inhg", newinhg);
setprop("/instrumentation/altimeter[2]/setting-inhg", newinhg);
setprop("/instrumentation/altimeter[3]/setting-inhg", newinhg);
@@ -417,8 +376,8 @@ setlistener("/instrumentation/altimeter/setting-inhg", func() {
}, 0, 0);
var newhpa = nil;
-setlistener("/instrumentation/altimeter/setting-hpa", func() {
- newhpa = getprop("/instrumentation/altimeter/setting-hpa");
+setlistener("/instrumentation/altimeter/setting-hpa", func(val) {
+ newhpa = val.getValue();
setprop("/instrumentation/altimeter[1]/setting-hpa", newhpa);
setprop("/instrumentation/altimeter[2]/setting-hpa", newhpa);
setprop("/instrumentation/altimeter[3]/setting-hpa", newhpa);
diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas
index b88890eb..2c61598c 100644
--- a/Nasal/Libraries/property-tree-setup.nas
+++ b/Nasal/Libraries/property-tree-setup.nas
@@ -69,9 +69,15 @@ var Controls = {
},
Lighting: {
landingLights: [props.globals.getNode("/controls/lighting/landing-lights[0]"),props.globals.getNode("/controls/lighting/landing-lights[1]"),props.globals.getNode("/controls/lighting/landing-lights[2]")],
+ noSmokingSign: props.globals.getNode("/controls/lighting/no-smoking-sign"),
+ seatbeltSign: props.globals.getNode("/controls/lighting/seatbelt-sign"),
+ strobe: props.globals.getNode("/controls/lighting/strobe"),
},
Switches: {
annunTest: props.globals.getNode("/controls/switches/annun-test"),
+ emerLtsSwitch: props.globals.getNode("/controls/switches/emer-lights"),
+ noSmokingSwitch: props.globals.getNode("/controls/switches/no-smoking-sign"),
+ seatbeltSwitch: props.globals.getNode("/controls/switches/seatbelt-sign"),
},
};
@@ -136,6 +142,10 @@ var Fdm = {
fuelUsed: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs")],
reverserAngle: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad")],
},
+ Tank: {
+ contentsLbs: [props.globals.getNode("/fdm/jsbsim/propulsion/tank[0]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[1]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"),
+ props.globals.getNode("/fdm/jsbsim/propulsion/tank[3]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[4]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs")],
+ },
},
},
};
@@ -207,6 +217,8 @@ var Instrumentation = {
Inputs: {
Discretes: {
flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override"),
+ flapAllOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override"),
+ steepApproach: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/steep-approach"),
},
},
},
diff --git a/Nasal/Libraries/sounds.nas b/Nasal/Libraries/sounds.nas
index 280e25be..6a84802d 100644
--- a/Nasal/Libraries/sounds.nas
+++ b/Nasal/Libraries/sounds.nas
@@ -7,6 +7,11 @@
# Sounds #
##########
+var playSoundOnce = func(path,delay) {
+ setprop(path,1);
+ settimer(func {setprop(path,0);},delay);
+}
+
setlistener("/sim/sounde/btn1", func {
if (!getprop("/sim/sounde/btn1")) {
return;
@@ -122,4 +127,11 @@ var pushbuttonSound = props.globals.getNode("/sim/sounde/pushbutton");
var pushbutton = func() {
pushbuttonSound.setValue(1);
settimer(func {pushbuttonSound.setValue(0);},0.20);
-}
\ No newline at end of file
+}
+
+setlistener("/sim/model/door-positions/doorc/lock-status",func(lock) {
+ if (lock.getValue() == 1)
+ playSoundOnce("/sim/sounde/doorc_locking",0.5);
+ else
+ playSoundOnce("/sim/sounde/doorc_unlocking",0.5);
+},0,0);
diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas
index 65c2348c..a83f7c0f 100644
--- a/Nasal/MCDU/F-PLN.nas
+++ b/Nasal/MCDU/F-PLN.nas
@@ -122,11 +122,17 @@ var fplnItem = {
return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"];
} elsif (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) {
var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed
+ var cstrAlt = "";
+
if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) {
- return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol];
+ cstrAlt = "FL" ~ math.round(num(me.wp.alt_cstr) / 100);
} else {
- return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol];
+ cstrAlt = me.wp.alt_cstr;
}
+
+ cstrAlt = (me.wp.alt_cstr_type == "above") ? "+" ~ cstrAlt : cstrAlt;
+ cstrAlt = (me.wp.alt_cstr_type == "below") ? "-" ~ cstrAlt : cstrAlt;
+ return [sprintf("%6s", cstrAlt), tcol];
} else {
return ["------", "wht"];
}
@@ -208,25 +214,25 @@ var fplnItem = {
} elsif (find("/", scratchpadStore) != -1) {
var scratchpadSplit = split("/", scratchpadStore);
- if (size(scratchpadSplit[0]) == 0) {
- if (num(scratchpadSplit[1]) != nil and (size(scratchpadSplit[1]) == 4 or size(scratchpadSplit[1]) == 5) and scratchpadSplit[1] >= 0 and scratchpadSplit[1] <= 39000) {
- me.wp.setAltitude(math.round(scratchpadSplit[1], 10), "at");
+ if (size(scratchpadSplit[0]) != 0) {
+ if (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350) {
+ me.wp.setSpeed(scratchpadSplit[0], "at");
mcdu_scratchpad.scratchpads[me.computer].empty();
} else {
mcdu_message(me.computer, "FORMAT ERROR");
}
+ }
+
+ if (right(scratchpadSplit[1], 1) == "+") {
+ validateAltCstrFpln(left(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "above", me);
+ } elsif (right(scratchpadSplit[1], 1) == "-") {
+ validateAltCstrFpln(left(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "below", me);
+ } elsif (left(scratchpadSplit[1], 1) == "+") {
+ validateAltCstrFpln(right(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "above", me);
+ } elsif (left(scratchpadSplit[1], 1) == "-") {
+ validateAltCstrFpln(right(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "below", me);
} else {
- if (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350 and
- num(scratchpadSplit[1]) != nil and (size(scratchpadSplit[1]) == 4 or size(scratchpadSplit[1]) == 5) and scratchpadSplit[1] >= 0 and scratchpadSplit[1] <= 39000) {
- me.wp.setSpeed(scratchpadSplit[0], "at");
- me.wp.setAltitude(math.round(scratchpadSplit[1], 10), "at");
- mcdu_scratchpad.scratchpads[me.computer].empty();
- } elsif (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350 and size(scratchpadSplit[1]) == 0) {
- me.wp.setSpeed(scratchpadSplit[0], "at");
- mcdu_scratchpad.scratchpads[me.computer].empty();
- } else {
- mcdu_message(me.computer, "FORMAT ERROR");
- }
+ validateAltCstrFpln(scratchpadSplit[1], "at", me);
}
} elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3 and scratchpadStore >= 100 and scratchpadStore <= 350) {
me.wp.setSpeed(scratchpadStore, "at");
@@ -240,6 +246,19 @@ var fplnItem = {
},
};
+var validateAltCstrFpln = func(scratchpadStore, type, self) {
+ if (num(scratchpadStore) != nil and (size(scratchpadStore) >= 3 and size(scratchpadStore) <= 5)) {
+ if (scratchpadStore >= 100 and scratchpadStore <= 39000) {
+ self.wp.setAltitude(math.round(scratchpadStore, 10), type);
+ mcdu_scratchpad.scratchpads[self.computer].empty();
+ } else {
+ mcdu_message(self.computer, "ENTRY OUT OF RANGE");
+ }
+ } else {
+ mcdu_message(self.computer, "FORMAT ERROR");
+ }
+}
+
var staticText = {
new: func(computer, text) {
var sT = {parents:[staticText]};
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index 8931782a..60d363d8 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -15,7 +15,7 @@ var MCDU_init = func(i) {
var MCDU_reset = func(i) {
setprop("/MCDU[" ~ i ~ "]/active", 0);
setprop("/MCDU[" ~ i ~ "]/atsu-active", 0);
- setprop("it-autoflight/settings/togaspd", 157); #aka v2 clone
+ setprop("/it-autoflight/settings/togaspd", 157); #aka v2 clone
setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
setprop("/MCDU[" ~ i ~ "]/last-atsu-page", "ATSUDLINK");
setprop("/MCDU[" ~ i ~ "]/active-system","");
@@ -25,10 +25,6 @@ var MCDU_reset = func(i) {
setprop("/FMGC/keyboard-right", 0);
#ACCONFIG
- setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
- setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
- setprop("/FMGC/internal/navdatabasecode", "AB20170101");
- setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
setprop("/FMGC/print/mcdu/page1/L1auto", 0);
setprop("/FMGC/print/mcdu/page1/L2auto", 0);
setprop("/FMGC/print/mcdu/page1/L3auto", 0);
@@ -500,6 +496,8 @@ var lskbutton = func(btn, i) {
mcdu_scratchpad.scratchpads[i].empty();
}
}
+ } else if (page == "VERTREV") {
+ canvas_mcdu.myVertRev[i].pushButtonLeft(2);
} else if (page == "MCDUTEXT") {
atsu.freeTexts[i].selection = 1;
atsu.freeTexts[i].changed = 1;
@@ -1527,7 +1525,12 @@ var button = func(btn, i, event = "") {
} else if (btn == "DOT") {
mcdu_scratchpad.scratchpads[i].addChar(".");
} else if (btn == "PLUSMINUS") {
- mcdu_scratchpad.scratchpads[i].addChar("-");
+ if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") {
+ mcdu_scratchpad.scratchpads[i].clear();
+ mcdu_scratchpad.scratchpads[i].addChar("+");
+ } else {
+ mcdu_scratchpad.scratchpads[i].addChar("-");
+ }
} else {
mcdu_scratchpad.scratchpads[i].addChar(btn);
}
diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas
index e3ced48d..6cd6df08 100644
--- a/Nasal/MCDU/VERTREV.nas
+++ b/Nasal/MCDU/VERTREV.nas
@@ -1,4 +1,5 @@
var scratchpadStore = nil;
+var scratchpadSplit = nil;
var vertRev = {
title: [nil, nil, nil],
@@ -55,11 +56,17 @@ var vertRev = {
getAlt: func() {
if (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) {
var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed
+ var cstrAlt = "";
+
if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) {
- return [sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)) ~ " ", tcol];
+ cstrAlt = "FL" ~ math.round(num(me.wp.alt_cstr) / 100);
} else {
- return [sprintf("%5.0f", me.wp.alt_cstr) ~ " ", tcol];
+ cstrAlt = me.wp.alt_cstr;
}
+
+ cstrAlt = (me.wp.alt_cstr_type == "above") ? "+" ~ cstrAlt : cstrAlt;
+ cstrAlt = (me.wp.alt_cstr_type == "below") ? "-" ~ cstrAlt : cstrAlt;
+ return [cstrAlt ~ (size(cstrAlt) == 6 ? "" : " "), tcol];
} else {
return [nil,nil];
}
@@ -71,7 +78,7 @@ var vertRev = {
me.title = ["VERT REV", " AT ", "PPOS"];
me.L1 = ["", " EFOB ---.-", "wht"];
me.R1 = ["", "EXTRA ---.- ", "wht"];
- me.L2 = ["250/10000", " CLB SPD LIM", "mag"];
+ me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"];
me.L4 = [" CONSTANT MACH", nil, "wht"];
me.L5 = [" WIND DATA", nil, "wht"];
me.L6 = [" RETURN", nil, "wht"];
@@ -84,7 +91,7 @@ var vertRev = {
me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]];
me.L1 = ["", " EFOB ---.-", "wht"];
me.R1 = ["", "EXTRA ---.- ", "wht"];
- me.L2 = ["250/10000", " CLB SPD LIM", "mag"];
+ me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"];
me.speed = me.getSpd();
if (me.speed[0] == nil) {
me.L3 = [" [ ]", " SPD CSTR", "blu"];
@@ -124,7 +131,7 @@ var vertRev = {
}
me.L1 = ["", " EFOB ---.-", "wht"];
me.R1 = ["", "EXTRA ---.- ", "wht"];
- me.L2 = ["250/10000", " CLB SPD LIM", "mag"];
+ me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"];
me.L4 = [" CONSTANT MACH", nil, "wht"];
me.L5 = [" WIND DATA", nil, "wht"];
me.L6 = [" RETURN", nil, "wht"];
@@ -140,7 +147,7 @@ var vertRev = {
}
me.L1 = ["", " EFOB ---.-", "wht"];
me.R1 = ["", "EXTRA ---.- ", "wht"];
- me.L2 = ["250/10000", " DES SPD LIM", "mag"];
+ me.L2 = [fmgc.FMGCInternal.desSpdLim ~ "/" ~ fmgc.FMGCInternal.desSpdLimAlt, " DES SPD LIM", "mag"];
me.L4 = [" CONSTANT MACH", nil, "wht"];
me.L5 = [" WIND DATA", nil, "wht"];
me.L6 = [" RETURN", nil, "wht"];
@@ -174,7 +181,65 @@ var vertRev = {
},
pushButtonLeft: func(index) {
scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad;
- if (index == 3 and me.type == 2) {
+ if (index == 2) {
+ if (scratchpadStore == "CLR") {
+ if (me.type == 1) {
+ fmgc.FMGCInternal.desSpdLim = 250;
+ fmgc.FMGCInternal.desSpdLimAlt = 10000;
+ fmgc.FMGCInternal.desSpdLimSet = 0;
+ } else {
+ fmgc.FMGCInternal.clbSpdLim = 250;
+ fmgc.FMGCInternal.clbSpdLimAlt = 10000;
+ fmgc.FMGCInternal.clbSpdLimSet = 0;
+ }
+ mcdu_scratchpad.scratchpads[me.computer].empty();
+ me._setupPageWithData();
+ canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
+ } elsif (find("/", scratchpadStore) != -1) {
+ scratchpadSplit = split("/", scratchpadStore);
+ if (size(scratchpadSplit[0]) == 3 and num(scratchpadSplit[0]) != nil and size(scratchpadSplit[1]) >= 3 and size(scratchpadSplit[1]) <= 5 and num(scratchpadSplit[1]) != nil) {
+ if (scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 340 and scratchpadSplit[1] >= 100 and scratchpadSplit[1] <= 39000) {
+ if (me.type == 1) {
+ fmgc.FMGCInternal.desSpdLim = scratchpadSplit[0];
+ fmgc.FMGCInternal.desSpdLimSet = 1;
+ if (size(scratchpadSplit[1]) != 0) {
+ fmgc.FMGCInternal.desSpdLimAlt = scratchpadSplit[1];
+ }
+ } else {
+ fmgc.FMGCInternal.clbSpdLim = scratchpadSplit[0];
+ fmgc.FMGCInternal.clbSpdLimSet = 1;
+ if (size(scratchpadSplit[1]) != 0) {
+ fmgc.FMGCInternal.clbSpdLimAlt = scratchpadSplit[1];
+ }
+ }
+ mcdu_scratchpad.scratchpads[me.computer].empty();
+ me._setupPageWithData();
+ canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
+ } else {
+ mcdu_message(me.computer, "ENTRY OUT OF RANGE");
+ }
+ } else {
+ mcdu_message(me.computer, "FORMAT ERROR");
+ }
+ } elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3) {
+ if (scratchpadStore >= 100 and scratchpadStore <= 340) {
+ if (me.type == 1) {
+ fmgc.FMGCInternal.desSpdLim = scratchpadStore;
+ fmgc.FMGCInternal.desSpdLimSet = 1;
+ } else {
+ fmgc.FMGCInternal.clbSpdLim = scratchpadStore;
+ fmgc.FMGCInternal.clbSpdLimSet = 1;
+ }
+ mcdu_scratchpad.scratchpads[me.computer].empty();
+ me._setupPageWithData();
+ canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
+ } else {
+ mcdu_message(me.computer, "ENTRY OUT OF RANGE");
+ }
+ } else {
+ mcdu_message(me.computer, "FORMAT ERROR");
+ }
+ } elsif (index == 3 and me.type == 2) {
if (scratchpadStore == "CLR") {
me.wp.setSpeed("delete");
mcdu_scratchpad.scratchpads[me.computer].empty();
@@ -242,18 +307,38 @@ var vertRev = {
mcdu_scratchpad.scratchpads[me.computer].empty();
me._setupPageWithData();
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
- } elsif (num(scratchpadStore) != nil and (size(scratchpadStore) == 4 or size(scratchpadStore) == 5) and scratchpadStore >= 0 and scratchpadStore <= 39000) {
- me.wp.setAltitude(math.round(scratchpadStore, 10), "at");
- mcdu_scratchpad.scratchpads[me.computer].empty();
- me._setupPageWithData();
- canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} else {
- mcdu_message(me.computer, "FORMAT ERROR");
+ if (right(scratchpadStore, 1) == "+") {
+ validateAltCstr(left(scratchpadStore, size(scratchpadStore) - 1), "above", me);
+ } elsif (right(scratchpadStore, 1) == "-") {
+ validateAltCstr(left(scratchpadStore, size(scratchpadStore) - 1), "below", me);
+ } elsif (left(scratchpadStore, 1) == "+") {
+ validateAltCstr(right(scratchpadStore, size(scratchpadStore) - 1), "above", me);
+ } elsif (left(scratchpadStore, 1) == "-") {
+ validateAltCstr(right(scratchpadStore, size(scratchpadStore) - 1), "below", me);
+ } else {
+ validateAltCstr(scratchpadStore, "at", me);
+ }
}
}
},
};
+var validateAltCstr = func(scratchpadStore, type, self) {
+ if (num(scratchpadStore) != nil and (size(scratchpadStore) >= 3 and size(scratchpadStore) <= 5)) {
+ if (scratchpadStore >= 100 and scratchpadStore <= 39000) {
+ self.wp.setAltitude(math.round(scratchpadStore, 10), type);
+ mcdu_scratchpad.scratchpads[self.computer].empty();
+ self._setupPageWithData();
+ canvas_mcdu.pageSwitch[self.computer].setBoolValue(0);
+ } else {
+ mcdu_message(self.computer, "ENTRY OUT OF RANGE");
+ }
+ } else {
+ mcdu_message(self.computer, "FORMAT ERROR");
+ }
+}
+
var updateCrzLvlCallback = func () {
if (canvas_mcdu.myVertRev[0] != nil) {
canvas_mcdu.myVertRev[0].updateR5();
diff --git a/Nasal/Systems/APU.nas b/Nasal/Systems/APU.nas
index 0ec3635c..919c9cf6 100644
--- a/Nasal/Systems/APU.nas
+++ b/Nasal/Systems/APU.nas
@@ -273,24 +273,6 @@ var APU = {
me.autoStop();
}
- if (systems.ELEC.Bus.dcBat.getValue() < 25) {
- if (!me._powerLost) {
- me._powerLost = 1;
- settimer(func() {
- if (me._powerLost) {
- if (me.GenericControls.starter.getValue()) {
- me.GenericControls.starter.setValue(0);
- }
- if (me.state != 0) {
- me.autoStop();
- }
- }
- }, 0.2);
- }
- } else {
- me._powerLost = 0;
- }
-
if (systems.ELEC.EmerElec.getValue() == 1 and (systems.ELEC.EmerElec45.getValue() != 1 and systems.ELEC.Source.EmerGen.voltsRelay.getValue() < 110)) {
me.inhibitEMERELEC = 1;
} else {
@@ -316,6 +298,19 @@ var APUController = {
}
};
+setlistener("/systems/apu/shutdown-power-loss", func(val) {
+ if (APUController.APU != nil) {
+ if (val.getBoolValue()) {
+ if (APUController.APU.GenericControls.starter.getValue()) {
+ APUController.APU.GenericControls.starter.setValue(0);
+ }
+ if (APUController.APU.state != 0) {
+ APUController.APU.autoStop();
+ }
+ }
+ }
+}, 0, 0);
+
var _masterTime = 0;
setlistener("/controls/apu/master", func() {
if (APUController.APU != nil) {
diff --git a/Nasal/Systems/ground_services.nas b/Nasal/Systems/ground_services.nas
index ff82adef..0b027dc7 100644
--- a/Nasal/Systems/ground_services.nas
+++ b/Nasal/Systems/ground_services.nas
@@ -19,8 +19,8 @@ var ground_services = {
setprop("/services/deicing_truck/de-ice", 0);
# Set them all to 0 if the aircraft is not stationary
- if (getprop("velocities/groundspeed-kt") >= 2) {
- setprop("/services/chocks/enable", 0);
+ if (pts.Velocities.groundspeed.getValue() >= 2) {
+ pts.Controls.Gear.chocks.setValue(0);
setprop("/services/fuel-truck/enable", 0);
setprop("/services/deicing_truck/enable", 0);
setprop("/services/catering/enable", 0);
diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas
index fc698241..a6c0faac 100644
--- a/Nasal/Systems/hydraulics.nas
+++ b/Nasal/Systems/hydraulics.nas
@@ -17,13 +17,21 @@ var HYD = {
},
Fail: {
blueElec: props.globals.getNode("/systems/failures/hydraulic/blue-elec"),
+ blueElecOvht: props.globals.getNode("/systems/failures/hydraulic/blue-elec-ovht"),
blueLeak: props.globals.getNode("/systems/failures/hydraulic/blue-leak"),
+ blueReservoirAirPressLow: props.globals.getNode("/systems/failures/hydraulic/blue-reservoir-air-press-lo"),
+ blueReservoirOvht: props.globals.getNode("/systems/failures/hydraulic/blue-reservoir-ovht"),
greenEng: props.globals.getNode("/systems/failures/hydraulic/green-edp"),
greenLeak: props.globals.getNode("/systems/failures/hydraulic/green-leak"),
+ greenReservoirAirPressLow: props.globals.getNode("/systems/failures/hydraulic/green-reservoir-air-press-lo"),
+ greenReservoirOvht: props.globals.getNode("/systems/failures/hydraulic/green-reservoir-ovht"),
ptuFault: props.globals.getNode("/systems/failures/hydraulic/ptu"),
yellowEng: props.globals.getNode("/systems/failures/hydraulic/yellow-edp"),
yellowElec: props.globals.getNode("/systems/failures/hydraulic/yellow-elec"),
+ yellowElecOvht: props.globals.getNode("/systems/failures/hydraulic/yellow-elec-ovht"),
yellowLeak: props.globals.getNode("/systems/failures/hydraulic/yellow-leak"),
+ yellowReservoirAirPressLow: props.globals.getNode("/systems/failures/hydraulic/yellow-reservoir-air-press-lo"),
+ yellowReservoirOvht: props.globals.getNode("/systems/failures/hydraulic/yellow-reservoir-ovht"),
},
Psi: {
blue: props.globals.getNode("/systems/hydraulic/blue-psi"),
@@ -36,6 +44,7 @@ var HYD = {
},
Pump: {
yellowElec: props.globals.getNode("/systems/hydraulic/sources/yellow-elec/pump-operate"),
+ yellowElecFail: props.globals.getNode("/ECAM/warnings/hyd/yellow-elec-pump-fail"),
},
Qty: {
blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"),
@@ -66,6 +75,12 @@ var HYD = {
blueAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/blue-abnorm-lo-pr"),
greenAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/green-abnorm-lo-pr"),
yellowAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/yellow-abnorm-lo-pr"),
+ blueLoLvl: props.globals.getNode("/systems/hydraulic/relays/blue-reservoir-low-qty-switch"),
+ greenLoLvl: props.globals.getNode("/systems/hydraulic/relays/green-reservoir-low-qty-switch"),
+ yellowLoLvl: props.globals.getNode("/systems/hydraulic/relays/yellow-reservoir-low-qty-switch"),
+ blueReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/blue-reservoir-overheat"),
+ greenReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/green-reservoir-overheat"),
+ yellowReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/yellow-reservoir-overheat"),
},
init: func() {
me.resetFail();
@@ -83,13 +98,21 @@ var HYD = {
},
resetFail: func() {
me.Fail.blueElec.setBoolValue(0);
+ me.Fail.blueElecOvht.setBoolValue(0);
me.Fail.blueLeak.setBoolValue(0);
+ me.Fail.blueReservoirAirPressLow.setBoolValue(0);
+ me.Fail.blueReservoirOvht.setBoolValue(0);
me.Fail.greenEng.setBoolValue(0);
me.Fail.greenLeak.setBoolValue(0);
+ me.Fail.greenReservoirAirPressLow.setBoolValue(0);
+ me.Fail.greenReservoirOvht.setBoolValue(0);
me.Fail.ptuFault.setBoolValue(0);
me.Fail.yellowEng.setBoolValue(0);
me.Fail.yellowElec.setBoolValue(0);
+ me.Fail.yellowElecOvht.setBoolValue(0);
me.Fail.yellowLeak.setBoolValue(0);
+ me.Fail.yellowReservoirAirPressLow.setBoolValue(0);
+ me.Fail.yellowReservoirOvht.setBoolValue(0);
},
loop: func(notification) {
# Decrease accumPressPsi when green and yellow hydraulics aren't pressurized
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index 08fd2ad7..ae370208 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -1800,6 +1800,28 @@
+
+ CockpitDoorLocking
+ once
+ Aircraft/A320-family/Sounds/Cockpit/cockpitdoor_lock.wav
+ /sim/sounde/doorc_locking
+
+ /sim/current-view/internal
+ 1
+
+
+
+
+ CockpitDoorUnlocking
+ once
+ Aircraft/A320-family/Sounds/Cockpit/cockpitdoor_unlock.wav
+ /sim/sounde/doorc_unlocking
+
+ /sim/current-view/internal
+ 0.8
+
+
+
fa_boarding
once
diff --git a/Sounds/Cockpit/cockpitdoor_lock.wav b/Sounds/Cockpit/cockpitdoor_lock.wav
new file mode 100644
index 00000000..4a13663f
Binary files /dev/null and b/Sounds/Cockpit/cockpitdoor_lock.wav differ
diff --git a/Sounds/Cockpit/cockpitdoor_unlock.wav b/Sounds/Cockpit/cockpitdoor_unlock.wav
new file mode 100644
index 00000000..175d7138
Binary files /dev/null and b/Sounds/Cockpit/cockpitdoor_unlock.wav differ
diff --git a/Systems/a320-apu.xml b/Systems/a320-apu.xml
index f6ad2161..f4ae5c9c 100644
--- a/Systems/a320-apu.xml
+++ b/Systems/a320-apu.xml
@@ -7,52 +7,52 @@
-
+
-
-
-
-
- /controls/pneumatics/switches/apu
- 1
-
- 252
- 0
-
-
-
-
-
-
-
-
-
- /systems/electrical/relay/apu-glc/output
- 110
-
- 132
- 0
-
-
-
-
-
-
-
-
- /systems/apu/electrical-load-kw
- /systems/apu/bleed-load-kw
-
- 400
-
-
-
-
-
- /systems/apu/apu-load-cmd
- 0.01
-
-
+
+
+
+
+ /controls/pneumatics/switches/apu
+ 1
+
+ 252
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/electrical/relay/apu-glc/output
+ 110
+
+ 132
+ 0
+
+
+
+
+
+
+
+
+ /systems/apu/electrical-load-kw
+ /systems/apu/bleed-load-kw
+
+ 400
+
+
+
+
+
+ /systems/apu/apu-load-cmd
+ 0.01
+
+
/engines/engine[2]/n1
1
@@ -60,60 +60,60 @@
-
-
- /systems/apu/apu-load
- 50
-
-
-
-
- /engines/engine[2]/n1
- 0.5
-
-
- /systems/apu/dn-dt
- 0
-
-
-
- /engines/engine[2]/n1
-
- 5.0 20.0
- 8.0 45.0
- 10.0 120.0
- 12.0 225.0
- 18.0 430.0
- 25.0 500.0
- 27.0 560.0
- 30.0 720.0
- 35.0 785.0
- 40.0 800.0
- 45.0 795.0
- 50.0 785.0
- 60.0 755.0
- 75.0 645.0
- 90.0 520.0
- 100.0 415.0
-
-
-
- /engines/engine[2]/n1
-
- 2.0 200.0
- 8.0 220.0
- 12.0 225.0
- 18.0 240.0
- 30.0 250.0
- 50.0 265.0
- 60.0 295.0
- 75.0 380.0
- 90.0 410.0
- 100.0 415.0
-
-
-
-
+
+
+ /systems/apu/apu-load
+ 50
+
+
+
+
+ /engines/engine[2]/n1
+ 0.5
+
+
+ /systems/apu/dn-dt
+ 0
+
+
+
+ /engines/engine[2]/n1
+
+ 5.0 20.0
+ 8.0 45.0
+ 10.0 120.0
+ 12.0 225.0
+ 18.0 430.0
+ 25.0 500.0
+ 27.0 560.0
+ 30.0 720.0
+ 35.0 785.0
+ 40.0 800.0
+ 45.0 795.0
+ 50.0 785.0
+ 60.0 755.0
+ 75.0 645.0
+ 90.0 520.0
+ 100.0 415.0
+
+
+
+ /engines/engine[2]/n1
+
+ 2.0 200.0
+ 8.0 220.0
+ 12.0 225.0
+ 18.0 240.0
+ 30.0 250.0
+ 50.0 265.0
+ 60.0 295.0
+ 75.0 380.0
+ 90.0 410.0
+ 100.0 415.0
+
+
+
+
@@ -137,31 +137,31 @@
-
-
+
+
-
-
- 1.0
-
- /systems/apu/apu-load
- 0.3
-
-
-
- /systems/apu/oil/oil-pressure-psi
-
- 0 0
- 25 135
- 35 105
- 55 85
-
-
-
- /engines/engine[2]/n1
- 100
-
-
+
+
+ 1.0
+
+ /systems/apu/apu-load
+ 0.3
+
+
+
+ /systems/apu/oil/oil-pressure-psi
+
+ 0 0
+ 25 135
+ 35 105
+ 55 85
+
+
+
+ /engines/engine[2]/n1
+ 100
+
+
@@ -170,10 +170,10 @@
/systems/apu/oil/level-l
-
- /engines/engine[2]/n1
- 100
-
+
+ /engines/engine[2]/n1
+ 100
+
/systems/apu/oil/allow-oil-consumption
-0.00000131437
simulation/channel-dt
@@ -182,6 +182,27 @@
+
+
+
+
+ /systems/electrical/bus/dc-bat lt 25
+
+
+
+
+ /systems/apu/shutdown-power-loss-cmd
+ 5
+ 100
+
+
+
+
+
+ /systems/apu/shutdown-power-loss-timer eq 1
+
+
+
diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml
index 9b416c21..94aa069d 100644
--- a/Systems/a320-electrical.xml
+++ b/Systems/a320-electrical.xml
@@ -2153,7 +2153,7 @@
-
+
/systems/electrical/bus/ac-1 lt 110
@@ -2163,20 +2163,33 @@
/systems/electrical/relay/ext-epc/contact-pos eq 0
/controls/electrical/switches/gen-1 eq 0
- /systems/failures/electrical/gen-1 eq 1
+ /ECAM/warnings/logic/gen-1-inop eq 1
/controls/electrical/switches/gen-2 eq 0
- /systems/failures/electrical/gen-2 eq 1
+ /ECAM/warnings/logic/gen-2-inop eq 1
/controls/electrical/switches/apu eq 0
- /systems/failures/electrical/apu eq 1
- /engines/engine[2]/n1 lt 94.9
+ /ECAM/warnings/logic/apu-gen-fault eq 1
+ /systems/apu/available eq 0
+
+ /systems/electrical/some-electric-thingie/emer-elec-config-cmd
+ 5
+ 100
+
+
+
+
+
+ /systems/electrical/some-electric-thingie/emer-elec-config-timer eq 1
+
+
+
diff --git a/Systems/a320-fbw.xml b/Systems/a320-fbw.xml
index a510a77b..808ca447 100644
--- a/Systems/a320-fbw.xml
+++ b/Systems/a320-fbw.xml
@@ -570,7 +570,7 @@
- /systems/fctl/fac1-healthy ne 0
+ /systems/fctl/fac1-healthy eq 1
/systems/fctl/fac1-healthy-latch eq 0
/gear/gear[0]/wow eq 1
@@ -641,7 +641,7 @@
- /systems/fctl/fac2-healthy ne 0
+ /systems/fctl/fac2-healthy eq 1
/systems/fctl/fac2-healthy-latch eq 0
/gear/gear[0]/wow eq 1
diff --git a/Systems/a320-fuel.xml b/Systems/a320-fuel.xml
index 9267dd76..9bd6e57a 100644
--- a/Systems/a320-fuel.xml
+++ b/Systems/a320-fuel.xml
@@ -186,7 +186,6 @@
- Timer for the Fuel Center pumps
/systems/fuel/quantity/center-low
120
0.00333
diff --git a/Systems/a320-fwc-phases.xml b/Systems/a320-fwc-phases.xml
index 05af76de..59894caf 100644
--- a/Systems/a320-fwc-phases.xml
+++ b/Systems/a320-fwc-phases.xml
@@ -7,7 +7,6 @@
- Timer for the ECAM phase system
/ECAM/logic/ground-calc-immediate
120
1
diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml
index a88998b0..fcdeb317 100644
--- a/Systems/a320-fwc.xml
+++ b/Systems/a320-fwc.xml
@@ -13,353 +13,315 @@
- Timer for the ECAM system
/ECAM/phases/timer/eng1idle
120
0.033
- Timer for the ECAM system
/ECAM/phases/timer/eng2idle
120
0.033
- Timer for the ECAM system
/ECAM/phases/timer/to-inhibit
120
0.33
- Timer for the ECAM system
/ECAM/phases/timer/ldg-inhibit
120
0.33
- Timer for the ECAM system
/ECAM/warnings/timer/bleed-1-fault
120
0.2
- Timer for the ECAM system
/ECAM/warnings/timer/bleed-2-fault
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/apu-bleed-fault
120
0.1
- Timer for the ECAM system
/systems/pneumatics/warnings/crossbleed-disag
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/crossbleed-fault-timer-was-one
0.1
120
- Timer for the ECAM system
/controls/engines/engine[0]/fire-btn
0.06666666666
- Timer for the ECAM system
/ECAM/warnings/logic/prv-1-not-shut-apu
120
1
- Timer for the ECAM system
/ECAM/warnings/logic/prv-2-not-shut-apu
120
1
- Timer for the ECAM system
/ECAM/warnings/logic/prv-1-not-shut
120
1
- Timer for the ECAM system
/ECAM/warnings/logic/prv-2-not-shut
120
1
- Timer for the ECAM system
/ECAM/warnings/timer/bleed-1-and-2-low-temp
120
0.00185185
- Timer for the ECAM system
/systems/pneumatics/warnings/lowtemp-1-mem
120
0.016666
- Timer for the ECAM system
/systems/pneumatics/warnings/lowtemp-2-mem
120
0.016666
- Timer for the ECAM system
/ECAM/warnings/logic/bleed-1-off-60
120
0.016666
- Timer for the ECAM system
/ECAM/warnings/logic/bleed-2-off-60
120
0.016666
- Timer for the ECAM system
/ECAM/warnings/logic/bleed-1-off-5
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/bleed-2-off-5
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-1-open
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-2-open
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-1-closed
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-2-closed
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/wing-anti-ice-flipflop-set-input
120
0.0285714
- Timer for the ECAM system
/ECAM/warnings/timer/phase-1-input
120
0.5
- Timer for the ECAM system
/controls/ice-protection/wing
120
0.04
-
- Timer for the ECAM system
+
/ECAM/warnings/logic/wing-anti-ice-left-closed-set-input
120
0.066666
-
- Timer for the ECAM system
+
/ECAM/warnings/logic/wing-anti-ice-right-closed-set-input
120
0.066666
- Timer for the ECAM system
/ECAM/warnings/logic/proc-wai-shutdown-flipflop
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/wing-hi-pr-left-input
120
0.025
- Timer for the ECAM system
/ECAM/warnings/logic/wing-hi-pr-right-input
120
0.025
- Timer for the ECAM system
/ECAM/warnings/logic/cranking-35-sec-input
120
0.028571
- Timer for the ECAM system
/ECAM/warnings/logic/pack-1-fault-closed-input
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/pack-2-fault-closed-input
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/pack-1-disagree-input
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/pack-2-disagree-input
120
0.1
- Timer for the ECAM system
/ECAM/warnings/logic/ignition
100
0.028571
- Timer for the ECAM system
/ECAM/warnings/logic/pack-1-fault-input
120
0.20
- Timer for the ECAM system
/ECAM/warnings/logic/pack-2-fault-input
120
0.20
- Timer for the ECAM system
/ECAM/warnings/logic/pack-1-fault-warning-input
120
0.50
- Timer for the ECAM system
/ECAM/warnings/logic/pack-2-fault-warning-input
120
0.50
- Timer for the ECAM system
/ECAM/warnings/logic/pack-1-off-input
120
0.0166666
- Timer for the ECAM system
/ECAM/warnings/logic/pack-2-off-input
120
0.0166666
- Timer for the ECAM system
/ECAM/warnings/logic/trim-air-fault-input
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/yaw-damper-1-fault
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/yaw-damper-2-fault
120
0.2
- Timer for the ECAM system
/ECAM/warnings/logic/nav-gpws-terr-fault
120
1.0
- Timer for the ECAM system
/ECAM/warnings/logic/apu-gen-fault-reset
120
0.5
+
+
+ /ECAM/warnings/logic/wing-anti-ice-left-open-set-15-input
+ 120
+ 0.06666666666
+
+
+
+ /ECAM/warnings/logic/wing-anti-ice-right-open-set-15-input
+ 120
+ 0.06666666666
+
@@ -785,7 +747,7 @@
- /gear/gear[1]/wow eq 0
+ /ECAM/timer/ground-calc ne 1
/controls/ice-protection/wing eq 1
@@ -804,13 +766,20 @@
/ECAM/warnings/logic/wai-ground-pulse-set eq 1
- /gear/gear[1]/wow eq 1
+ /ECAM/timer/ground-calc eq 1
/ECAM/warnings/timer/wing-anti-ice-25 ne 1
+
+
+
+ /ECAM/warnings/logic/wing-anti-ice-left-closed-set-timer eq 1
+
+
+
@@ -832,6 +801,14 @@
+
+
+
+ /ECAM/warnings/logic/wing-anti-ice-right-closed-set-timer eq 1
+
+
+
+
@@ -867,7 +844,7 @@
/controls/ice-protection/wing eq 1
- /gear/gear[1]/wow eq 1
+ /ECAM/timer/ground-calc eq 1
/ECAM/warnings/logic/wai-on eq 1
@@ -888,14 +865,14 @@
/controls/engines/engine[1]/fire-btn eq 0
/ECAM/warnings/logic/wai-ground-pulse eq 1
/ECAM/warnings/logic/wai-ground-pulse-set eq 1
-
+
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state ne 3
+ /ECAM/warnings/logic/eng/eng-1-shutdown eq 1
+ /ECAM/warnings/logic/eng/eng-2-shutdown eq 0
- /engines/engine[0]/state ne 3
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/eng-1-shutdown eq 0
+ /ECAM/warnings/logic/eng/eng-2-shutdown eq 1
@@ -930,6 +907,20 @@
+
+
+
+ /ECAM/warning-phase eq 6
+
+
+
+
+
+
+ /ECAM/warning-phase eq 9
+
+
+
@@ -958,11 +949,106 @@
+
+
+
+ /systems/pneumatics/valves/wing-ice-1 ne 0
+
+ /ECAM/warnings/logic/wai-on eq 0
+
+
+
+
+
+
+
+
+ /systems/electrical/bus/dc-ess-shed ge 25
+ /ECAM/warnings/logic/wing-anti-ice-left-open-set-15 eq 1
+
+
+
+
+
+
+ /systems/pneumatics/valves/wing-ice-1 eq 0
+ /ECAM/warnings/timer/phase-1 eq 1
+
+
+ /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
+ /ECAM/warnings/logic/wai-phase-9-pulse eq 1
+
+ /systems/pneumatics/valves/wing-ice-1 ne 0
+ /controls/pneumatics/switches/bleed-1 eq 1
+
+
+ /systems/pneumatics/valves/wing-ice-1 ne 0
+ /controls/pneumatics/switches/bleed-1 eq 0
+
+ /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
+ /ECAM/warnings/logic/wai-phase-9-pulse eq 1
+
+
+
+
+
+
+
+
+
+ /systems/pneumatics/valves/wing-ice-2 ne 0
+
+ /ECAM/warnings/logic/wai-on eq 0
+
+
+
+
+
+
+
+
+ /systems/electrical/bus/dc-ess-shed ge 25
+ /ECAM/warnings/logic/wing-anti-ice-right-open-set-15 eq 1
+
+
+
+
+
+
+ /systems/pneumatics/valves/wing-ice-2 eq 0
+ /ECAM/warnings/timer/phase-1 eq 1
+
+
+ /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
+ /ECAM/warnings/logic/wai-phase-9-pulse eq 1
+
+ /systems/pneumatics/valves/wing-ice-2 ne 0
+ /controls/pneumatics/switches/bleed-2 eq 1
+
+
+ /systems/pneumatics/valves/wing-ice-2 ne 0
+ /controls/pneumatics/switches/bleed-2 eq 0
+
+ /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
+ /ECAM/warnings/logic/wai-phase-9-pulse eq 1
+
+
+
+
+
/ECAM/warnings/logic/wai-on eq 1
- /systems/pneumatics/psi/engine-1-psi gt 49
+ /systems/pneumatics/psi/engine-1-psi gt 49
@@ -1537,7 +1623,7 @@
- /engines/engine[0]/n2-actual ge 59.4
+ /engines/engine[1]/n2-actual ge 59.4
@@ -1587,7 +1673,6 @@
- Timer for the ECAM system
/ECAM/warnings/logic/gen-1-fault-set
120
0.1818
@@ -1655,7 +1740,6 @@
- Timer for the ECAM system
/ECAM/warnings/logic/gen-2-fault-set
120
0.1818
@@ -1722,7 +1806,6 @@
- Timer for the ECAM system
/ECAM/warnings/logic/apu-gen-fault-set
120
0.2
@@ -2296,6 +2379,14 @@
/it-fbw/law eq 0
/fdm/jsbsim/fcs/slat-pos-deg lt 15
+
+ aero/alpha-deg-corrected ge 13.5
+
+ /systems/navigation/aligned-1 eq 1
+ /systems/navigation/aligned-2 eq 1
+ /systems/navigation/aligned-3 eq 1
+
+
/systems/navigation/adr/output/aoa-1 ge 13.5
/systems/navigation/adr/operating-1 eq 1
@@ -2313,23 +2404,41 @@
/it-fbw/law eq 0
/fdm/jsbsim/fcs/slat-pos-deg ge 15
-
- /systems/navigation/adr/output/aoa-1 ge 22
- /systems/navigation/adr/operating-1 eq 1
-
-
- /systems/navigation/adr/output/aoa-2 ge 22
- /systems/navigation/adr/operating-2 eq 1
-
-
- /systems/navigation/adr/output/aoa-3 ge 22
- /systems/navigation/adr/operating-3 eq 1
+
+
+ aero/alpha-deg-corrected ge 22
+
+ /systems/navigation/aligned-1 eq 1
+ /systems/navigation/aligned-2 eq 1
+ /systems/navigation/aligned-3 eq 1
+
+
+
+ /systems/navigation/adr/output/aoa-1 ge 22
+ /systems/navigation/adr/operating-1 eq 1
+
+
+ /systems/navigation/adr/output/aoa-2 ge 22
+ /systems/navigation/adr/operating-2 eq 1
+
+
+ /systems/navigation/adr/output/aoa-3 ge 22
+ /systems/navigation/adr/operating-3 eq 1
+
/it-fbw/law ne 0
/fdm/jsbsim/fcs/slat-pos-deg lt 15
+
+ aero/alpha-deg-corrected ge 8
+
+ /systems/navigation/aligned-1 eq 1
+ /systems/navigation/aligned-2 eq 1
+ /systems/navigation/aligned-3 eq 1
+
+
/systems/navigation/adr/output/aoa-1 ge 8
/systems/navigation/adr/operating-1 eq 1
@@ -2347,17 +2456,27 @@
/it-fbw/law ne 0
/fdm/jsbsim/fcs/slat-pos-deg ge 15
-
- /systems/navigation/adr/output/aoa-1 ge 14
- /systems/navigation/adr/operating-1 eq 1
-
-
- /systems/navigation/adr/output/aoa-2 ge 14
- /systems/navigation/adr/operating-2 eq 1
-
-
- /systems/navigation/adr/output/aoa-3 ge 14
- /systems/navigation/adr/operating-3 eq 1
+
+
+ aero/alpha-deg-corrected ge 14
+
+ /systems/navigation/aligned-1 eq 1
+ /systems/navigation/aligned-2 eq 1
+ /systems/navigation/aligned-3 eq 1
+
+
+
+ /systems/navigation/adr/output/aoa-1 ge 14
+ /systems/navigation/adr/operating-1 eq 1
+
+
+ /systems/navigation/adr/output/aoa-2 ge 14
+ /systems/navigation/adr/operating-2 eq 1
+
+
+ /systems/navigation/adr/output/aoa-3 ge 14
+ /systems/navigation/adr/operating-3 eq 1
+
@@ -2590,9 +2709,9 @@
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1
- /engines/engine[0]/state eq 3
+ /ECAM/warnings/logic/eng/JE1NORUN eq 1
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/JE2NORUN eq 1
/ECAM/warnings/logic/eng/eng-2-reverse eq 1
@@ -2609,9 +2728,9 @@
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-2-output eq 1
- /engines/engine[0]/state eq 3
+ /ECAM/warnings/logic/eng/JE1NORUN eq 1
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/JE2NORUN eq 1
/ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
@@ -2628,9 +2747,9 @@
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/JE2NORUN eq 1
- /engines/engine[0]/state eq 3
+ /ECAM/warnings/logic/eng/JE1NORUN eq 1
/ECAM/warnings/logic/eng/eng-1-reverse eq 1
@@ -2647,9 +2766,9 @@
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/JE2NORUN eq 1
- /engines/engine[0]/state eq 3
+ /ECAM/warnings/logic/eng/JE1NORUN eq 1
/ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
@@ -2822,7 +2941,7 @@
-
+
/engines/engine[0]/n2-actual lt 59.4
@@ -2830,8 +2949,8 @@
-
- /ECAM/warnings/logic/eng/dual-failure-5-sec-input
+
+ /ECAM/warnings/logic/eng/dual-failure-2-sec-input
0.5
100
@@ -2859,7 +2978,7 @@
/controls/engines/engine[0]/cutoff-switch eq 1
/controls/engines/engine[1]/cutoff-switch eq 1
- /ECAM/warnings/logic/eng/dual-failure-5-sec eq 1
+ /ECAM/warnings/logic/eng/dual-failure-2-sec eq 1
@@ -3041,6 +3160,36 @@
+
+ /controls/engines/engine[0]/cutoff-switch
+ 0.03333333333
+ 100
+
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-1-oil-lo-pr-cutoff-delay eq 0
+ /ECAM/warnings/logic/eng/JE1NORUN eq 0
+ /engines/engine[0]/oil-psi-actual lt 13
+
+
+
+
+ /controls/engines/engine[1]/cutoff-switch
+ 0.03333333333
+ 100
+
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-oil-lo-pr-cutoff-delay eq 0
+ /ECAM/warnings/logic/eng/JE2NORUN eq 0
+ /engines/engine[1]/oil-psi-actual lt 13
+
+
+
@@ -3063,6 +3212,114 @@
+
+
+
+
+
+ /ECAM/phases/phase-calculation/engines-1-2-not-running eq 1
+ /ECAM/timer/ground-calc eq 1
+
+
+
+
+ /ECAM/warnings/press/exess-residual-pressure-ground-input
+ 0.14285714285
+ 100
+
+
+
+
+
+ /ECAM/warnings/press/exess-residual-pressure-ground eq 1
+ /systems/pressurization/deltap-norm ge 0.1
+
+
+
+
+ /ECAM/warnings/press/exess-residual-pressure-input
+ 0.2
+ 100
+
+
+
+
+
+ /systems/pressurization/cabinalt-norm ge 9550
+
+
+
+
+ /ECAM/warnings/timer/press/excess-cabin-alt-input
+ 1
+ 100
+
+
+
+
+
+ /ECAM/warnings/timer/press/excess-cabin-alt eq 1
+
+
+
+
+
+
+ /ECAM/warning-phase eq 3
+ /ECAM/warning-phase eq 10
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 10000
+ /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 10000
+ /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 10000
+
+
+ /systems/navigation/adr/operating-1 eq 0
+ /systems/navigation/adr/operating-2 eq 0
+ /systems/navigation/adr/operating-3 eq 0
+
+
+ /ECAM/warnings/logic/press/excess-cabin-alt eq 1
+ /ECAM/warnings/logic/press/excess-cabin-alt-pulse eq 1
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 16000
+ /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 16000
+ /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 16000
+
+
+ /systems/navigation/adr/operating-1 eq 0
+ /systems/navigation/adr/operating-2 eq 0
+ /systems/navigation/adr/operating-3 eq 0
+
+
+ /ECAM/warnings/logic/press/excess-cabin-alt eq 1
+ /ECAM/warnings/logic/press/excess-cabin-alt-pulse eq 1
+
+
+
+
+
+
+ /ECAM/warnings/logic/phase-3-10-pulse-input eq 1
+ /ECAM/warnings/logic/phase-3-10-pulse eq 1
+
+
+
+
+
@@ -3561,9 +3818,9 @@
-
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
+
+ /ECAM/warnings/logic/eng/JE1NORUN eq 0
+ /ECAM/warnings/logic/eng/JE2NORUN eq 0
@@ -3576,8 +3833,8 @@
- /engines/engine[0]/state ne 3
- /engines/engine[1]/state ne 3
+ /ECAM/warnings/logic/eng/JE1NORUN eq 1
+ /ECAM/warnings/logic/eng/JE2NORUN eq 1
/ECAM/timer/ground-calc eq 0
@@ -3591,7 +3848,7 @@
- /engines/engine[0]/state eq 3
+ /ECAM/warnings/logic/eng/JE1NORUN eq 0
/ECAM/warning-phase ne 1
/ECAM/warning-phase ne 2
@@ -3610,7 +3867,7 @@
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/JE2NORUN eq 0
/ECAM/warning-phase ne 1
/ECAM/warning-phase ne 2
@@ -3698,21 +3955,8 @@
-
-
-
- /ECAM/warning-phase le 2
- /ECAM/warning-phase ge 9
-
- /engines/engine[0]/state eq 3
-
-
- /ECAM/warning-phase gt 2
- /ECAM/warning-phase lt 9
- /ECAM/warning-phase ne 4
- /ECAM/warning-phase ne 5
-
-
+ /ECAM/warning-phase ne 4
+ /ECAM/warning-phase ne 5
/ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
/ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
@@ -3721,21 +3965,8 @@
-
-
-
- /ECAM/warning-phase le 2
- /ECAM/warning-phase ge 9
-
- /engines/engine[1]/state eq 3
-
-
- /ECAM/warning-phase gt 2
- /ECAM/warning-phase lt 9
- /ECAM/warning-phase ne 4
- /ECAM/warning-phase ne 5
-
-
+ /ECAM/warning-phase ne 4
+ /ECAM/warning-phase ne 5
/ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
/ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
@@ -3744,8 +3975,7 @@
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
+ /ECAM/warnings/logic/eng/dual-failure eq 0
/ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
/ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
@@ -3754,18 +3984,16 @@
- /ECAM/timer/ground-calc eq 0
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
+ /ECAM/timer/ground-calc ne 1
+ /ECAM/warnings/logic/eng/dual-failure eq 0
- /ECAM/timer/ground-calc eq 0
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
+ /ECAM/timer/ground-calc ne 1
+ /ECAM/warnings/logic/eng/dual-failure eq 0
/ECAM/warnings/logic/SFLAPEXT eq 1
@@ -3789,9 +4017,8 @@
- /ECAM/timer/ground-calc eq 0
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
+ /ECAM/timer/ground-calc ne 1
+ /ECAM/warnings/logic/eng/dual-failure eq 0
/ECAM/warnings/logic/SFLAPEXT eq 1
@@ -3817,6 +4044,28 @@
+
+
+
+ /systems/hydraulic/sources/yellow-elec/pump-operate eq 1
+ /systems/hydraulic/yellow-psi lt 1450
+
+
+
+
+
+
+
+ /systems/hydraulic/sources/yellow-elec/pump-operate eq 1
+ /systems/hydraulic/yellow-psi ge 1450
+
+
+ /ECAM/warnings/logic/phase-2-pulse-input eq 1
+ /ECAM/warnings/logic/phase-2-pulse eq 1
+
+
+
+
@@ -4039,7 +4288,7 @@
-
+
diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml
index f3ad3abc..b929eb70 100644
--- a/Systems/a320-hydraulic.xml
+++ b/Systems/a320-hydraulic.xml
@@ -5,7 +5,8 @@
/systems/hydraulic/sys-incr-rate
-
+
+
@@ -84,7 +85,7 @@
-
+
@@ -132,6 +133,16 @@
+
+
+
@@ -172,7 +183,6 @@
- Timer for the ECAM system
/systems/hydraulic/sources/blue-elec/pump-operate-apu
100
0.0083333
@@ -204,6 +214,11 @@
+
+
@@ -233,7 +248,6 @@
/controls/hydraulic/switches/green-edp eq 1
- /systems/hydraulic/sources/green-edp/fire-valve lt 0.10
@@ -250,6 +264,15 @@
+
+
@@ -269,6 +292,12 @@
+
+
+
@@ -298,10 +327,13 @@
/controls/hydraulic/switches/yellow-edp eq 1
- /systems/hydraulic/sources/yellow-edp/fire-valve lt 0.10
+
+
+
+
@@ -341,17 +373,23 @@
-
-
- /systems/hydraulic/green-qty
- 1.0
-
-
- /systems/hydraulic/green-psi-cmd-pump
- /systems/hydraulic/sources/ptu/yellow-green
-
- 0
-
+
+
+
+ /systems/hydraulic/green-qty
+ 1.0
+
+
+ /systems/hydraulic/green-psi-cmd-pump
+ /systems/hydraulic/sources/ptu/yellow-green
+
+ 0
+
+
+ 1
+ /systems/hydraulic/sources/green-edp/fire-valve
+
+
@@ -385,17 +423,23 @@
-
-
- /systems/hydraulic/yellow-qty
- 1.0
-
-
- /systems/hydraulic/yellow-psi-cmd-pump
- /systems/hydraulic/sources/ptu/green-yellow
-
- 0
-
+
+
+
+ /systems/hydraulic/yellow-qty
+ 1.0
+
+
+ /systems/hydraulic/yellow-psi-cmd-pump
+ /systems/hydraulic/sources/ptu/green-yellow
+
+ 0
+
+
+ 1
+ /systems/hydraulic/sources/yellow-edp/fire-valve
+
+
@@ -438,7 +482,6 @@
/systems/hydraulic/sys-decr-rate
-
@@ -448,9 +491,15 @@
+
+
+
+
+
+ /systems/electrical/bus/dc-service-bus ge 25
/gear/gear[0]/compression-norm ne 0
@@ -494,18 +543,38 @@
+
+
+ /position/altitude-ft ge 1500
+ /gear/gear[0]/compression-norm ne 0
+
+ /systems/electrical/bus/dc-service-bus ge 25
/controls/hydraulic/switches/ptu eq 1
/systems/hydraulic/sources/ptu/ptu-hydraulic-condition eq 1
/systems/hydraulic/sources/ptu/ptu-inhibited eq 0
- /systems/electrical/bus/dc-2 ge 25
/systems/failures/hydraulic/ptu ne 1
- /systems/hydraulic/sources/yellow-edp/fire-valve lt 0.10
+
+
+
+
+ /position/gear-agl-ft ge 1500
+ /gear/gear[0]/compression-norm ne 0
+
+ /systems/electrical/bus/dc-service-bus ge 25
+ /controls/hydraulic/switches/ptu eq 1
+ /systems/hydraulic/sources/ptu/ptu-hydraulic-condition eq 1
+ /systems/hydraulic/sources/ptu/ptu-inhibited eq 0
+ /systems/failures/hydraulic/ptu ne 1
+
+
+
+
@@ -520,18 +589,6 @@
120
-
-
-
- /controls/hydraulic/switches/ptu eq 1
- /systems/hydraulic/sources/ptu/ptu-hydraulic-condition eq 1
- /systems/hydraulic/sources/ptu/ptu-inhibited eq 0
- /systems/electrical/bus/dc-2 ge 25
- /systems/failures/hydraulic/ptu ne 1
- /systems/hydraulic/sources/green-edp/fire-valve lt 0.10
-
-
-
@@ -554,11 +611,18 @@
-
+
/systems/hydraulic/yellow-accumulator-psi
9
+
+
+
+ /systems/electrical/bus/dc-ess lt 25
+
+
+
@@ -573,85 +637,105 @@
-
+
/systems/hydraulic/brakes/pressure-left-psi-input
9
-
+
+
+
+ /systems/electrical/bus/dc-ess lt 25
+
+
+
+
/systems/hydraulic/brakes/pressure-right-psi-input
9
+
+
+
+ /systems/electrical/bus/dc-ess lt 25
+
+
+
-
+
-
+
-
-
- /systems/hydraulic/sources/blue-elec/output-psi le 1450
-
- /engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
-
-
- /systems/hydraulic/blue-qty lt 2.4
+
+ /systems/electrical/bus/dc-1 ge 25
+ /systems/hydraulic/blue-qty lt 2.2
-
+
-
-
- /systems/hydraulic/sources/green-edp/output-psi le 1750
- /engines/engine[0]/state eq 3
-
-
- /systems/hydraulic/green-qty lt 3.5
+
+ /systems/electrical/bus/dc-1 ge 25
+ /systems/hydraulic/green-qty lt 3.0
+
+
+
+
+
+
+ /systems/electrical/bus/dc-1 ge 25
+ /systems/hydraulic/yellow-qty lt 3.0
+
+
+
+
+
+
+ /systems/electrical/bus/dc-1 ge 25
+
+ /systems/hydraulic/relays/green-reservoir-low-qty-switch eq 1
+ /systems/failures/hydraulic/green-reservoir-air-press-lo eq 1
-
+
-
-
- /systems/hydraulic/sources/yellow-edp/output-psi le 1750
- /engines/engine[1]/state eq 3
-
-
- /systems/hydraulic/yellow-qty lt 3.5
+
+ /systems/electrical/bus/dc-2 ge 25
+
+ /systems/hydraulic/relays/yellow-reservoir-low-qty-switch eq 1
+ /systems/failures/hydraulic/yellow-reservoir-air-press-lo eq 1
-
+
-
-
- /systems/hydraulic/sources/yellow-elec/output-psi le 1450
- /systems/hydraulic/sources/yellow-edp/output-psi le 1750
-
- /systems/hydraulic/sources/ptu/green-yellow le 1750
- /systems/hydraulic/sources/ptu/yellow-green le 1750
-
-
-
- /systems/hydraulic/yellow-qty lt 3.5
-
+
+ /systems/electrical/bus/dc-ess ge 25
+ /systems/failures/hydraulic/blue-reservoir-ovht eq 1
-
+
-
- /systems/hydraulic/yellow-qty lt 3.5
- /systems/hydraulic/green-qty lt 3.5
+
+ /systems/electrical/bus/dc-1 ge 25
+ /systems/failures/hydraulic/green-reservoir-ovht eq 1
+
+
+
+ /systems/electrical/bus/dc-2 ge 25
+ /systems/failures/hydraulic/yellow-reservoir-ovht eq 1
+
+
+
+
@@ -687,4 +771,104 @@
+
+
+
+
+
+ /systems/electrical/bus/dc-2 ge 25
+
+ /systems/hydraulic/relays/yellow-reservoir-overheat eq 1
+ /systems/hydraulic/relays/green-reservoir-overheat eq 1
+
+
+ /systems/hydraulic/relays/green-reservoir-low-qty-air-press-fault eq 1
+ /systems/hydraulic/relays/yellow-reservoir-low-qty-air-press-fault eq 1
+
+ /controls/hydraulic/switches/ptu eq 1
+
+
+
+
+
+
+
+
+ /systems/electrical/bus/dc-1 ge 25
+
+ /systems/hydraulic/relays/green-reservoir-overheat eq 1
+
+
+
+ /systems/hydraulic/sources/green-edp/output-psi le 1750
+ /engines/engine[0]/state eq 3
+
+ /systems/hydraulic/relays/green-reservoir-low-qty-air-press-fault eq 1
+
+ /controls/hydraulic/switches/green-edp eq 1
+
+
+
+
+
+
+
+
+ /systems/electrical/bus/dc-2 ge 25
+
+ /systems/hydraulic/relays/yellow-reservoir-overheat eq 1
+
+
+
+ /systems/hydraulic/sources/yellow-edp/output-psi le 1750
+ /engines/engine[1]/state eq 3
+
+ /systems/hydraulic/relays/yellow-reservoir-low-qty-air-press-fault eq 1
+
+ /controls/hydraulic/switches/yellow-edp eq 1
+
+
+
+
+
+
+
+
+ /systems/hydraulic/relays/blue-reservoir-overheat eq 1
+ /systems/failures/hydraulic/blue-elec-ovht eq 1
+
+
+ /systems/hydraulic/relays/blue-reservoir-low-qty-switch eq 1
+ /systems/failures/hydraulic/blue-reservoir-air-press-lo eq 1
+
+ /systems/hydraulic/sources/blue-elec/output-psi le 1450
+
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+ /controls/hydraulic/switches/blue-elec-ovrd eq 1
+
+
+
+ /controls/hydraulic/switches/blue-elec eq 1
+
+
+
+
+
+
+ /systems/hydraulic/relays/yellow-reservoir-overheat eq 1
+ /systems/failures/hydraulic/yellow-elec-ovht eq 1
+
+
+ /systems/hydraulic/relays/yellow-reservoir-low-qty-switch eq 1
+ /systems/failures/hydraulic/yellow-reservoir-air-press-lo eq 1
+ /systems/hydraulic/sources/yellow-elec/output-psi le 1450
+
+ /controls/hydraulic/switches/yellow-elec eq 1
+
+
+
+
+
+
diff --git a/Systems/a320-lights-proprules.xml b/Systems/a320-lights-proprules.xml
index c1e702cd..9657e427 100644
--- a/Systems/a320-lights-proprules.xml
+++ b/Systems/a320-lights-proprules.xml
@@ -74,12 +74,4 @@
-
-
- gain
- 1.0
- /controls/lighting/annunciator-lights-tied
-
-
-
diff --git a/Systems/a320-lights.xml b/Systems/a320-lights.xml
index b4f01878..8f9b556d 100644
--- a/Systems/a320-lights.xml
+++ b/Systems/a320-lights.xml
@@ -28,37 +28,29 @@
- /systems/electrical/bus/ac-1 gt 25
+ /systems/electrical/bus/ac-1 gt 110
-
- /systems/electrical/bus/ac-1 gt 25
+
+ /systems/electrical/bus/ac-si-bus ge 110
+ /systems/electrical/bus/ac-ess-shed ge 110
- /systems/electrical/bus/ac-1 gt 25
+ /systems/electrical/bus/ac-1 gt 110
- /systems/electrical/bus/ac-1 gt 25
-
-
-
-
-
-
/systems/electrical/bus/ac-1 gt 110
- /systems/electrical/bus/ac-2 gt 110
- /systems/electrical/bus/dc-2 gt 25
@@ -97,7 +89,7 @@
-
+
/controls/lighting/turnoff-light-switch eq 1
@@ -231,5 +223,45 @@
+
+
+
+
+
+
+
+ /systems/electrical/bus/dc-ess ge 25
+ /systems/electrical/bus/dc-service-bus ge 25
+
+
+ /systems/pressurization/cabinalt-norm ge 11300
+ /controls/switches/no-smoking-sign eq 1
+
+
+
+ /controls/switches/no-smoking-sign eq 0.5
+ /gear/gear[0]/position-norm ge 0.8
+
+ /systems/electrical/bus/dc-ess ge 25
+ /systems/electrical/bus/dc-service-bus ge 25
+
+
+
+
+
+
+
+
+ /systems/electrical/bus/dc-ess ge 25
+ /systems/electrical/bus/dc-service-bus ge 25
+
+
+ /systems/pressurization/cabinalt-norm ge 11300
+ /controls/switches/seatbelt-sign eq 1
+
+
+
+
+
diff --git a/Systems/a320-misc.xml b/Systems/a320-misc.xml
index 04800d0a..95f983ca 100644
--- a/Systems/a320-misc.xml
+++ b/Systems/a320-misc.xml
@@ -385,6 +385,28 @@
+
+
+
+
+
+ /instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override eq 1
+
+ /instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override eq 1
+ /controls/flight/flaps-pos ge 4
+
+
+
+
+
+
+
+ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit eq 0
+
+
+
+
+
@@ -444,4 +466,62 @@
+
+
+
+
+
+
+
+ /fdm/jsbsim/fcs/slat-pos-deg
+ 15
+
+
+ aero/alpha-deg-corrected
+
+ -1.5 136.409
+ 0.0 53.447
+ 3.0 0
+ 6.5 -53.447
+ 8.0 -136.409
+
+
+
+ aero/alpha-deg-corrected
+
+ -1.5 136.409
+ 0.0 53.447
+ 3.0 0
+ 12.5 -53.447
+ 14.0 -136.409
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /instrumentation/airspeed-indicator/indicated-mach
+ /instrumentation/airspeed-indicator/indicated-speed-kt
+
+
+
+
+
+
+
+ /instrumentation/airspeed-indicator/indicated-mach
+ /instrumentation/airspeed-indicator/indicated-speed-kt
+
+
+
+
+
+
diff --git a/Systems/a320-oxygen.xml b/Systems/a320-oxygen.xml
index 1fb49433..40979221 100644
--- a/Systems/a320-oxygen.xml
+++ b/Systems/a320-oxygen.xml
@@ -316,11 +316,11 @@
/controls/oxygen/passenger-mask-reset eq 1
- /systems/electrical/bus/dc-ess lt 25
+ /systems/electrical/bus/dc-ess-shed lt 25
/systems/oxygen/passenger-oxygen/masks-deploy-cmd eq 1
- /systems/electrical/bus/dc-ess ge 25
+ /systems/electrical/bus/dc-ess-shed ge 25
diff --git a/Systems/a320-pneumatic.xml b/Systems/a320-pneumatic.xml
index 1ada48d2..a9e718a1 100644
--- a/Systems/a320-pneumatic.xml
+++ b/Systems/a320-pneumatic.xml
@@ -459,13 +459,13 @@
-
+
/systems/startup-power-valves eq 1
/systems/failures/icing/wing-left-valve eq 1
-
+
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-1-psi le 1
@@ -473,7 +473,7 @@
/systems/pneumatics/valves/wing-ice-1-cmd eq 0
/systems/pneumatics/valves/wing-ice-1 ne 0
-
+
/systems/electrical/bus/dc-ess-shed ge 25
@@ -501,13 +501,13 @@
-
+
/systems/startup-power-valves eq 1
/systems/failures/icing/wing-right-valve eq 1
-
+
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-2-psi le 1
@@ -515,7 +515,7 @@
/systems/pneumatics/valves/wing-ice-2-cmd eq 0
/systems/pneumatics/valves/wing-ice-2 ne 0
-
+
/systems/electrical/bus/dc-ess-shed ge 25
@@ -540,13 +540,13 @@
-
+
/systems/startup-power-valves eq 1
/systems/failures/icing/engine-left-valve eq 1
-
+
/systems/electrical/bus/dc-1 lt 25
/systems/pneumatics/source/engine-1-hp-psi lt 7
@@ -554,7 +554,7 @@
/systems/pneumatics/valves/engine-ice-1-cmd eq 1
/systems/pneumatics/valves/engine-ice-1 ne 1
-
+
/systems/electrical/bus/dc-1 ge 25
@@ -579,13 +579,13 @@
-
+
/systems/startup-power-valves eq 1
/systems/failures/icing/engine-right-valve eq 1
-
+
/systems/electrical/bus/dc-2 lt 25
/systems/pneumatics/source/engine-2-hp-psi lt 7
@@ -593,7 +593,7 @@
/systems/pneumatics/valves/engine-ice-2-cmd eq 1
/systems/pneumatics/valves/engine-ice-2 ne 1
-
+
/systems/electrical/bus/dc-2 ge 25
@@ -1297,8 +1297,11 @@
- /systems/pneumatics/valves/wing-ice-1 ne /controls/ice-protection/wing
- /systems/pneumatics/valves/wing-ice-2 ne /controls/ice-protection/wing
+ /ECAM/warnings/logic/wing-anti-ice-sys-fault eq 1
+ /ECAM/warnings/flipflop/wing-anti-ice-left-open eq 1
+ /ECAM/warnings/flipflop/wing-anti-ice-right-open eq 1
+ /systems/pneumatics/valves/wing-ice-1 ne /systems/pneumatics/valves/wing-ice-1-cmd
+ /systems/pneumatics/valves/wing-ice-2 ne /systems/pneumatics/valves/wing-ice-2-cmd
/systems/electrical/bus/dc-ess-shed lt 25
diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml
index 9aca49cd..fe3297cf 100644
--- a/Systems/ecam-proprules.xml
+++ b/Systems/ecam-proprules.xml
@@ -586,6 +586,17 @@
+
+ monostable
+
+
+ /ECAM/warnings/logic/phase-2-pulse-input
+
+
+
+
monostable
+
+ monostable
+
+
+ /ECAM/warnings/logic/phase-6-pulse-input
+
+
+
+
+
+ monostable
+
+
+ /ECAM/warnings/logic/phase-9-pulse-input
+
+
+
+
+
+ monostable
+
+
+ /ECAM/warnings/logic/phase-3-10-pulse-input
+
+
+
+
monostable
+
+ monostable
+
+
+ /ECAM/warnings/logic/press/excess-cabin-alt
+
+
+
+
monostable
+
+ RS
+
+
+ /ECAM/warnings/logic/wing-anti-ice-left-open-set
+ 1
+
+
+
+ /ECAM/warnings/logic/wing-anti-ice-left-open-reset
+
+
+
+
+
+ RS
+
+
+ /ECAM/warnings/logic/wing-anti-ice-right-open-set
+ 1
+
+
+
+ /ECAM/warnings/logic/wing-anti-ice-right-open-reset
+
+
+
+
SR
@@ -1161,4 +1244,37 @@
+
+
+ RS
+
+ /ECAM/warnings/hyd/yellow-elec-pump-fail-set
+
+
+ /ECAM/warnings/hyd/yellow-elec-pump-fail-reset
+
+
+
+
+
+ SR
+
+ /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-set
+
+
+ /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-reset
+
+
+
+
+
+ SR
+
+ /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top-set
+
+
+ /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-reset
+
+
+