Merge branch 'dev' into rework
This commit is contained in:
commit
ec27b7bdfe
18 changed files with 191 additions and 111 deletions
|
@ -258,7 +258,7 @@ var colddark = func {
|
|||
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
|
||||
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
|
||||
setprop("/controls/flight/flaps", 0);
|
||||
setprop("/controls/flight/speedbrake-arm", 0);
|
||||
pts.Controls.Flight.speedbrakeArm.setValue(0);
|
||||
setprop("/controls/flight/speedbrake", 0);
|
||||
setprop("/controls/gear/gear-down", 1);
|
||||
setprop("/controls/flight/elevator-trim", 0);
|
||||
|
@ -317,7 +317,7 @@ var beforestart = func {
|
|||
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
|
||||
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
|
||||
setprop("/controls/flight/flaps", 0);
|
||||
setprop("/controls/flight/speedbrake-arm", 0);
|
||||
pts.Controls.Flight.speedbrakeArm.setValue(0);
|
||||
setprop("/controls/flight/speedbrake", 0);
|
||||
setprop("/controls/gear/gear-down", 1);
|
||||
setprop("/controls/flight/elevator-trim", 0);
|
||||
|
@ -380,9 +380,9 @@ var beforestart_b = func {
|
|||
setprop("/controls/adirs/mcducbtn", 1);
|
||||
setprop("/controls/switches/beacon", 1);
|
||||
setprop("/controls/lighting/nav-lights-switch", 1);
|
||||
setprop("/controls/switches/no-smoking-sign", 0.5);
|
||||
setprop("/controls/switches/seatbelt-sign", 1);
|
||||
setprop("/controls/switches/emer-lights", 0.5);
|
||||
libraries.noSmokingSwitch.setValue(0.5);
|
||||
libraries.seatbeltSwitch.setValue(1.0);
|
||||
libraries.emerLtsSwitch.setValue(0.5);
|
||||
setprop("/controls/radio/rmp[0]/on", 1);
|
||||
setprop("/controls/radio/rmp[1]/on", 1);
|
||||
setprop("/controls/radio/rmp[2]/on", 1);
|
||||
|
@ -412,7 +412,7 @@ var taxi = func {
|
|||
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
|
||||
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
|
||||
setprop("/controls/flight/flaps", 0);
|
||||
setprop("/controls/flight/speedbrake-arm", 0);
|
||||
pts.Controls.Flight.speedbrakeArm.setValue(0);
|
||||
setprop("/controls/flight/speedbrake", 0);
|
||||
setprop("/controls/gear/gear-down", 1);
|
||||
setprop("/controls/flight/elevator-trim", 0);
|
||||
|
@ -476,9 +476,9 @@ var taxi_b = func {
|
|||
setprop("/controls/switches/beacon", 1);
|
||||
setprop("/controls/switches/wing-lights", 1);
|
||||
setprop("/controls/lighting/nav-lights-switch", 1);
|
||||
setprop("/controls/switches/no-smoking-sign", 0.5);
|
||||
setprop("/controls/switches/seatbelt-sign", 1);
|
||||
setprop("/controls/switches/emer-lights", 0.5);
|
||||
libraries.noSmokingSwitch.setValue(0.5);
|
||||
libraries.seatbeltSwitch.setValue(1.0);
|
||||
libraries.emerLtsSwitch.setValue(0.5);
|
||||
setprop("/controls/radio/rmp[0]/on", 1);
|
||||
setprop("/controls/radio/rmp[1]/on", 1);
|
||||
setprop("/controls/radio/rmp[2]/on", 1);
|
||||
|
@ -537,7 +537,7 @@ var takeoff = func {
|
|||
setprop("/controls/lighting/taxi-light-switch", 1);
|
||||
setprop("/controls/switches/landing-lights-l", 1);
|
||||
setprop("/controls/switches/landing-lights-r", 1);
|
||||
setprop("/controls/flight/speedbrake-arm", 1);
|
||||
pts.Controls.Flight.speedbrakeArm.setValue(1);
|
||||
setprop("/controls/flight/flaps", 0.2);
|
||||
setprop("/controls/atc/mode-knob", 4);
|
||||
atc.transponderPanel.modeSwitch(5);
|
||||
|
|
|
@ -1158,6 +1158,7 @@
|
|||
<object-name>vord_led</object-name>
|
||||
<object-name>vord_led.001</object-name>
|
||||
<object-name>vs-text</object-name>
|
||||
<object-name>vs-text-last-2-digits</object-name>
|
||||
<object-name>vs-text-test</object-name>
|
||||
<object-name>wpt_led</object-name>
|
||||
<object-name>wpt_led.001</object-name>
|
||||
|
@ -1206,7 +1207,6 @@
|
|||
<object-name>audio_call_vhf2_led</object-name>
|
||||
<object-name>audio_call_vhf3_led</object-name>
|
||||
<object-name>audio_mech_sgn</object-name>
|
||||
<!-- <object-name>autoland_light_on</object-name> -->
|
||||
<object-name>ecam_c_b_led</object-name>
|
||||
<object-name>ecam_el_dc_led</object-name>
|
||||
<object-name>ecam_sts_led</object-name>
|
||||
|
@ -4310,23 +4310,6 @@
|
|||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>lvlch.ind</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>alt-text</object-name>
|
||||
|
@ -4394,6 +4377,7 @@
|
|||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>vs-text</object-name>
|
||||
<object-name>vs-text-last-2-digits</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<not-equals>
|
||||
|
@ -4632,16 +4616,42 @@
|
|||
<name>vs-text</name>
|
||||
<offsets>
|
||||
<x-m>-0.377</x-m>
|
||||
<y-m>0.09043</y-m>
|
||||
<y-m>0.0850</y-m>
|
||||
<z-m>0.50254</z-m>
|
||||
<heading-deg>90</heading-deg>
|
||||
<roll-deg>72.81</roll-deg>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">number-value</type>
|
||||
<format type="string">%4.0f</format>
|
||||
<property>it-autoflight/input/vs</property>
|
||||
<type type="string">text-value</type>
|
||||
<format type="string">%s</format>
|
||||
<property>it-autoflight/output/vs-fcu-display</property>
|
||||
<truncate>false</truncate>
|
||||
<font type="string">led.txf</font>
|
||||
<draw-text>true</draw-text>
|
||||
<draw-alignment>false</draw-alignment>
|
||||
<draw-boundingbox>false</draw-boundingbox>
|
||||
<character-size>0.008</character-size>
|
||||
<font-resolution>
|
||||
<width type="int">32</width>
|
||||
<height type="int">32</height>
|
||||
</font-resolution>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<name>vs-text-last-2-digits</name>
|
||||
<offsets>
|
||||
<x-m>-0.377</x-m>
|
||||
<y-m>0.0977</y-m>
|
||||
<z-m>0.5028</z-m>
|
||||
<heading-deg>90</heading-deg>
|
||||
<roll-deg>72.81</roll-deg>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">text-value</type>
|
||||
<format type="string">oo</format>
|
||||
<property>autopilot/serviceable</property>
|
||||
<truncate>false</truncate>
|
||||
<font type="string">led.txf</font>
|
||||
<draw-text>true</draw-text>
|
||||
|
@ -4658,7 +4668,7 @@
|
|||
<name>fpa-text</name>
|
||||
<offsets>
|
||||
<x-m>-0.377</x-m>
|
||||
<y-m>0.09043</y-m>
|
||||
<y-m>0.0860</y-m>
|
||||
<z-m>0.50254</z-m>
|
||||
<heading-deg>90</heading-deg>
|
||||
<roll-deg>72.81</roll-deg>
|
||||
|
@ -4666,7 +4676,7 @@
|
|||
<alignment>center-center</alignment>
|
||||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">number-value</type>
|
||||
<format type="string">%2.1f</format>
|
||||
<format type="string">%+2.1f</format>
|
||||
<property>it-autoflight/input/fpa</property>
|
||||
<truncate>false</truncate>
|
||||
<font type="string">led.txf</font>
|
||||
|
@ -7236,6 +7246,7 @@
|
|||
<object-name>hdg-text</object-name>
|
||||
<object-name>alt-text</object-name>
|
||||
<object-name>vs-text</object-name>
|
||||
<object-name>vs-text-last-2-digits</object-name>
|
||||
<object-name>spd-text-test</object-name>
|
||||
<object-name>hdg-text-test</object-name>
|
||||
<object-name>alt-text-test</object-name>
|
||||
|
@ -7250,9 +7261,9 @@
|
|||
<object-name>rudder-trim</object-name>
|
||||
<object-name>rudder-trim-letter</object-name>
|
||||
<diffuse>
|
||||
<red>0.89</red>
|
||||
<green>0.37</green>
|
||||
<blue>0.08</blue>
|
||||
<red>0.75</red>
|
||||
<green>0.30</green>
|
||||
<blue>0.0</blue>
|
||||
</diffuse>
|
||||
<ambient>
|
||||
<red>0</red>
|
||||
|
@ -7265,9 +7276,9 @@
|
|||
<blue>0</blue>
|
||||
</specular>
|
||||
<emission>
|
||||
<red>0.89</red>
|
||||
<green>0.37</green>
|
||||
<blue>0.08</blue>
|
||||
<red>0.75</red>
|
||||
<green>0.30</green>
|
||||
<blue>0.0</blue>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 105 KiB |
|
@ -221,7 +221,7 @@ var canvas_PFD_base = {
|
|||
"AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP",
|
||||
"ALT_digit_DN","ALT_error","ALT_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"];
|
||||
"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"];
|
||||
},
|
||||
updateDu1: func() {
|
||||
var elapsedtime_act = elapsedtime.getValue();
|
||||
|
@ -876,7 +876,18 @@ var canvas_PFD_base = {
|
|||
}
|
||||
|
||||
# FMA Pitch
|
||||
me["FMA_pitch"].setText(sprintf("%s", pitch_mode_act));
|
||||
if (pitch_mode_act == "V/S") {
|
||||
me["FMA_pitch"].setText(sprintf("%s ", pitch_mode_act));
|
||||
me["vsFMArate"].setText(sprintf("%+4.0f",fmgc.Input.vs.getValue()));
|
||||
me["vsFMArate"].show();
|
||||
} elsif (pitch_mode_act == "FPA") {
|
||||
me["FMA_pitch"].setText(sprintf("%s ", pitch_mode_act));
|
||||
me["vsFMArate"].setText(sprintf("%+3.1f°",fmgc.Input.fpa.getValue()));
|
||||
me["vsFMArate"].show();
|
||||
}else {
|
||||
me["FMA_pitch"].setText(sprintf("%s", pitch_mode_act));
|
||||
me["vsFMArate"].hide();
|
||||
}
|
||||
me["FMA_pitcharm"].setText(sprintf("%s", pitch_mode_armed_act));
|
||||
me["FMA_pitcharm2"].setText(sprintf("%s", pitch_mode2_armed_act));
|
||||
|
||||
|
|
|
@ -6256,4 +6256,17 @@
|
|||
x="823.7511"
|
||||
sodipodi:role="line"
|
||||
id="tspan1797">G</tspan></text>
|
||||
<text
|
||||
inkscape:label="#text983"
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.65757698"
|
||||
x="417.56354"
|
||||
y="34.634907"
|
||||
id="vsFMArate"
|
||||
transform="scale(0.87678236,1.1405339)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1777"
|
||||
x="417.56354"
|
||||
y="34.634907"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99950027px;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.65757698">-800</tspan></text>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 341 KiB |
|
@ -14,7 +14,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
|
|||
|
||||
|
||||
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
|
||||
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")];
|
||||
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/click", 0, "BOOL")];
|
||||
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
|
||||
|
||||
var lineIndex = 0;
|
||||
|
@ -223,7 +223,7 @@ var warning = {
|
|||
me.noRepeat = 1;
|
||||
},
|
||||
sound: func() {
|
||||
if (me.aural > 3) { return; }
|
||||
if (me.aural == 9) { return; }
|
||||
if (me.active == 0 and me.wasActive == 1) {
|
||||
aural[me.aural].setBoolValue(0);
|
||||
me.wasActive = 0;
|
||||
|
|
|
@ -66,7 +66,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(flap_not_zero);
|
||||
}
|
||||
|
||||
if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
|
||||
if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and pts.Systems.Navigation.ADR.Output.overspeed.getBoolValue()) {
|
||||
overspeed.active = 1;
|
||||
if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
|
||||
overspeedVMO.active = 1;
|
||||
|
@ -3158,7 +3158,7 @@ var messages_config_memo = func {
|
|||
toMemoLine1.colour = "c";
|
||||
}
|
||||
|
||||
if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) {
|
||||
if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue() ) {
|
||||
toMemoLine2.msg = " SIGNS ON";
|
||||
toMemoLine2.colour = "g";
|
||||
} else {
|
||||
|
@ -3166,7 +3166,7 @@ var messages_config_memo = func {
|
|||
toMemoLine2.colour = "c";
|
||||
}
|
||||
|
||||
if (getprop("/controls/flight/speedbrake-arm")) {
|
||||
if (pts.Controls.Flight.speedbrakeArm.getValue()) {
|
||||
toMemoLine3.msg = " SPLRS ARM";
|
||||
toMemoLine3.colour = "g";
|
||||
} else {
|
||||
|
@ -3202,7 +3202,7 @@ var messages_config_memo = func {
|
|||
setprop("/ECAM/to-memo-reset", 0);
|
||||
}
|
||||
|
||||
if ((phaseVarMemo == 2 and getprop("/ECAM/engine-start-time") != 0 and getprop("/ECAM/engine-start-time") + 120 < pts.Sim.Time.elapsedSec.getValue()) or getprop("/ECAM/to-memo-flipflop")) {
|
||||
if ((phaseVarMemo == 2 and engStrtTime.getValue() != 0 and engStrtTime.getValue() + 120 < pts.Sim.Time.elapsedSec.getValue()) or getprop("/ECAM/to-memo-flipflop")) {
|
||||
toMemoLine1.active = 1;
|
||||
toMemoLine2.active = 1;
|
||||
toMemoLine3.active = 1;
|
||||
|
@ -3224,7 +3224,7 @@ var messages_config_memo = func {
|
|||
ldgMemoLine1.colour = "c";
|
||||
}
|
||||
|
||||
if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) {
|
||||
if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue()) {
|
||||
ldgMemoLine2.msg = " SIGNS ON";
|
||||
ldgMemoLine2.colour = "g";
|
||||
} else {
|
||||
|
@ -3232,7 +3232,7 @@ var messages_config_memo = func {
|
|||
ldgMemoLine2.colour = "c";
|
||||
}
|
||||
|
||||
if (getprop("/controls/flight/speedbrake-arm")) {
|
||||
if (pts.Controls.Flight.speedbrakeArm.getValue()) {
|
||||
ldgMemoLine3.msg = " SPLRS ARM";
|
||||
ldgMemoLine3.colour = "g";
|
||||
} else {
|
||||
|
@ -3343,19 +3343,19 @@ var messages_memo = func {
|
|||
}
|
||||
}
|
||||
|
||||
if (getprop("/controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
|
||||
if (pts.Controls.Flight.speedbrakeArm.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
|
||||
gnd_splrs.active = 1;
|
||||
} else {
|
||||
gnd_splrs.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
|
||||
if (libraries.seatbeltLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
|
||||
seatbelts.active = 1;
|
||||
} else {
|
||||
seatbelts.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/controls/lighting/no-smoking-sign") == 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 (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!
|
||||
nosmoke.active = 1;
|
||||
} else {
|
||||
nosmoke.active = 0;
|
||||
|
|
|
@ -5,33 +5,29 @@
|
|||
|
||||
var ap_active = 0;
|
||||
var athr_active = 0;
|
||||
var aileron = 0;
|
||||
var elevator = 0;
|
||||
var engModeSel = 0;
|
||||
var APUMaster = 0;
|
||||
var APURPM = 0;
|
||||
var gearDown = 0;
|
||||
var apOffTime = 0;
|
||||
var athrOffTime = 0;
|
||||
var apWarnNode = 0;
|
||||
var athrWarnNode = 0;
|
||||
var engStrtTimeSw = 0;
|
||||
var engStrtTime = 0;
|
||||
var page = 0;
|
||||
var apOffTime = props.globals.initNode("/ECAM/warnings/ap-off-time", 0, "INT");
|
||||
var athrOffTime = props.globals.initNode("/ECAM/warnings/athr-off-time", 0, "INT");
|
||||
var engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
|
||||
var engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
|
||||
var apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
|
||||
var athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
|
||||
var page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
|
||||
|
||||
var gearWarnLight = props.globals.initNode("/ECAM/warnings/landing-gear-warning-light", 0, "BOOL");
|
||||
|
||||
var ECAM = {
|
||||
_cachePage: "",
|
||||
init: func() {
|
||||
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
|
||||
|
||||
apOffTime = props.globals.initNode("/ECAM/warnings/ap-off-time", 0, "INT");
|
||||
athrOffTime = props.globals.initNode("/ECAM/warnings/athr-off-time", 0, "INT");
|
||||
engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
|
||||
engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
|
||||
apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
|
||||
athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
|
||||
page.setValue("door");
|
||||
apOffTime.setValue(0);
|
||||
athrOffTime.setValue(0);
|
||||
engStrtTimeSw.setValue(0);
|
||||
engStrtTime.setValue(0);
|
||||
apWarnNode.setValue(0);
|
||||
athrWarnNode.setValue(0);
|
||||
me.reset();
|
||||
},
|
||||
update_items: [
|
||||
|
|
|
@ -105,18 +105,18 @@ var FCUController = {
|
|||
FD1: func() {
|
||||
if (me.FCUworking) {
|
||||
if (!fmgc.Output.fd1.getBoolValue()) {
|
||||
fd1Input.setValue(1);
|
||||
fmgc.Input.fd1.setValue(1);
|
||||
} else {
|
||||
fd1Input.setValue(0);
|
||||
fmgc.Input.fd1.setValue(0);
|
||||
}
|
||||
}
|
||||
},
|
||||
FD2: func() {
|
||||
if (me.FCUworking) {
|
||||
if (!fmgc.Output.fd2.getBoolValue()) {
|
||||
fd2Input.setValue(1);
|
||||
fmgc.Input.fd2.setValue(1);
|
||||
} else {
|
||||
fd2Input.setValue(0);
|
||||
fmgc.Input.fd2.setValue(0);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -187,20 +187,20 @@ var FCUController = {
|
|||
me.ias = fmgc.Velocities.indicatedAirspeedKt.getValue();
|
||||
me.mach = fmgc.Velocities.indicatedMach.getValue();
|
||||
if (!fmgc.Input.ktsMach.getBoolValue()) {
|
||||
if (me.ias >= 100 and me.ias <= 350) {
|
||||
if (me.ias >= 100 and me.ias <= 399) {
|
||||
fmgc.Input.kts.setValue(math.round(me.ias));
|
||||
} else if (me.ias < 100) {
|
||||
fmgc.Input.kts.setValue(100);
|
||||
} else if (me.ias > 350) {
|
||||
fmgc.Input.kts.setValue(350);
|
||||
} else if (me.ias > 399) {
|
||||
fmgc.Input.kts.setValue(399);
|
||||
}
|
||||
} else if (fmgc.Input.ktsMach.getBoolValue()) {
|
||||
if (me.mach >= 0.50 and me.mach <= 0.82) {
|
||||
if (me.mach >= 0.10 and me.mach <= 0.99) {
|
||||
fmgc.Input.mach.setValue(math.round(me.mach, 0.001));
|
||||
} else if (me.mach < 0.50) {
|
||||
fmgc.Input.mach.setValue(0.50);
|
||||
} else if (me.mach > 0.82) {
|
||||
fmgc.Input.mach.setValue(0.82);
|
||||
} else if (me.mach < 0.10) {
|
||||
fmgc.Input.mach.setValue(0.10);
|
||||
} else if (me.mach > 0.99) {
|
||||
fmgc.Input.mach.setValue(0.99);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,10 +221,10 @@ var FCUController = {
|
|||
} else if (d == -10) {
|
||||
me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error
|
||||
}
|
||||
if (me.machTemp < 0.50) {
|
||||
fmgc.Input.mach.setValue(0.50);
|
||||
} else if (me.machTemp > 0.82) {
|
||||
fmgc.Input.mach.setValue(0.82);
|
||||
if (me.machTemp < 0.10) {
|
||||
fmgc.Input.mach.setValue(0.10);
|
||||
} else if (me.machTemp > 0.99) {
|
||||
fmgc.Input.mach.setValue(0.99);
|
||||
} else {
|
||||
fmgc.Input.mach.setValue(me.machTemp);
|
||||
}
|
||||
|
@ -241,8 +241,8 @@ var FCUController = {
|
|||
}
|
||||
if (me.iasTemp < 100) {
|
||||
fmgc.Input.kts.setValue(100);
|
||||
} else if (me.iasTemp > 350) {
|
||||
fmgc.Input.kts.setValue(350);
|
||||
} else if (me.iasTemp > 399) {
|
||||
fmgc.Input.kts.setValue(399);
|
||||
} else {
|
||||
fmgc.Input.kts.setValue(me.iasTemp);
|
||||
}
|
||||
|
@ -379,6 +379,7 @@ var FCUController = {
|
|||
} else {
|
||||
fmgc.Input.vert.setValue(1);
|
||||
fmgc.Input.vs.setValue(0);
|
||||
fmgc.Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",0),3));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -413,6 +414,7 @@ var FCUController = {
|
|||
} else {
|
||||
fmgc.Input.vs.setValue(me.vsTemp);
|
||||
}
|
||||
fmgc.Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",fmgc.Input.vs.getValue()),3));
|
||||
} else if (fmgc.Output.vert.getValue() == 5) {
|
||||
me.fpaTemp = fmgc.Input.fpa.getValue();
|
||||
if (d == 1) {
|
||||
|
|
|
@ -174,6 +174,7 @@ var Custom = {
|
|||
},
|
||||
Output: {
|
||||
fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
|
||||
vsFCU: props.globals.initNode("/it-autoflight/output/vs-fcu-display", "", "STRING"),
|
||||
},
|
||||
Sound: {
|
||||
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
|
||||
|
@ -196,6 +197,7 @@ var ITAF = {
|
|||
Input.hdg.setValue(360);
|
||||
Input.alt.setValue(10000);
|
||||
Input.vs.setValue(0);
|
||||
Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",0),3));
|
||||
Input.fpa.setValue(0);
|
||||
Input.lat.setValue(9);
|
||||
Input.vert.setValue(9);
|
||||
|
@ -252,6 +254,10 @@ var ITAF = {
|
|||
Internal.vsTemp = Internal.vs.getValue();
|
||||
Position.indicatedAltitudeFtTemp = Position.indicatedAltitudeFt.getValue();
|
||||
|
||||
# Update VLS / VMAX for autothrust
|
||||
FMGCNodes.vmax.setValue(FMGCInternal.maxspeed);
|
||||
FMGCNodes.vlsMin.setValue(FMGCInternal.vls_min);
|
||||
|
||||
# LNAV Engagement
|
||||
if (Output.lnavArm.getBoolValue()) {
|
||||
me.checkLNAV(1);
|
||||
|
@ -846,13 +852,13 @@ var ITAF = {
|
|||
}
|
||||
},
|
||||
syncKts: func() {
|
||||
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), 100, 350));
|
||||
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), 100, 399));
|
||||
},
|
||||
syncKtsGa: func() { # Same as syncKts, except doesn't go below V2
|
||||
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), FMGCInternal.v2, 350));
|
||||
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), FMGCInternal.v2, 399));
|
||||
},
|
||||
syncMach: func() {
|
||||
Input.mach.setValue(math.clamp(math.round(Velocities.indicatedMach.getValue(), 0.001), 0.5, 0.82));
|
||||
Input.mach.setValue(math.clamp(math.round(Velocities.indicatedMach.getValue(), 0.001), 0.1, 0.99));
|
||||
},
|
||||
syncHdg: func() {
|
||||
Input.hdg.setValue(math.round(Internal.hdgPredicted.getValue())); # Switches to track automatically
|
||||
|
@ -861,8 +867,11 @@ var ITAF = {
|
|||
Input.alt.setValue(math.clamp(math.round(Internal.altPredicted.getValue(), 100), 0, 50000));
|
||||
Internal.alt.setValue(math.clamp(math.round(Internal.altPredicted.getValue(), 100), 0, 50000));
|
||||
},
|
||||
tempVS: 0,
|
||||
syncVs: func() {
|
||||
Input.vs.setValue(math.clamp(math.round(Internal.vs.getValue(), 100), -6000, 6000));
|
||||
me.tempVS = math.clamp(math.round(Internal.vs.getValue(), 100), -6000, 6000);
|
||||
Input.vs.setValue(me.tempVS);
|
||||
fmgc.Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",me.tempVS),3));
|
||||
},
|
||||
syncFpa: func() {
|
||||
Input.fpa.setValue(math.clamp(math.round(Internal.fpa.getValue(), 0.1), -9.9, 9.9));
|
||||
|
@ -1022,6 +1031,19 @@ setlistener("/it-autoflight/input/vert", func {
|
|||
}
|
||||
});
|
||||
|
||||
# Mode Reversions
|
||||
setlistener(pts.Systems.Navigation.ADR.Output.overspeed, func(v) {
|
||||
if (v.getBoolValue() and !Output.ap1.getBoolValue() and !Output.ap2.getBoolValue() and Output.athr.getBoolValue() and Modes.PFD.FMA.pitchMode.getValue() == "OP CLB" and Modes.PFD.FMA.throttle.getValue() == "THR CLB") {
|
||||
Input.fd1.setValue(0);
|
||||
Input.fd2.setValue(0);
|
||||
ecam.aural[5].setBoolValue(0);
|
||||
settimer(func() {
|
||||
ecam.aural[5].setBoolValue(1);
|
||||
}, 0.15);
|
||||
}
|
||||
}, 0, 0);
|
||||
|
||||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
ITAF.init();
|
||||
});
|
||||
|
|
|
@ -265,6 +265,8 @@ var FMGCNodes = {
|
|||
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
||||
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
||||
phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"),
|
||||
vlsMin: props.globals.initNode("/FMGC/internal/vls-min", 0, "DOUBLE"),
|
||||
vmax: props.globals.initNode("/FMGC/internal/vmax", 0, "DOUBLE"),
|
||||
};
|
||||
|
||||
############
|
||||
|
@ -636,7 +638,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
}
|
||||
} elsif (FMGCInternal.phase == 1) {
|
||||
if (gear0) {
|
||||
|
||||
if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " ") { # rejected takeoff
|
||||
newphase = 0;
|
||||
systems.PNEU.pressMode.setValue("GN");
|
||||
|
@ -680,7 +681,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
if (alt >= accel_agl_ft) { # todo when insert altn or new dest
|
||||
newphase = 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -706,8 +706,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
FMGCNodes.phase.setValue(newphase);
|
||||
}
|
||||
|
||||
|
||||
|
||||
############################
|
||||
# fuel
|
||||
############################
|
||||
|
|
|
@ -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);
|
||||
setprop("/controls/switches/emer-lights", 0.5);
|
||||
libraries.emerLtsSwitch.setValue(0.5);
|
||||
# cockpit voice recorder stuff
|
||||
setprop("/controls/CVR/power", 0);
|
||||
setprop("/controls/CVR/test", 0);
|
||||
|
@ -62,9 +62,9 @@ var variousReset = func() {
|
|||
setprop("/modes/fcu/hdg-time", -45);
|
||||
setprop("/controls/navigation/switching/att-hdg", 0);
|
||||
setprop("/controls/navigation/switching/air-data", 0);
|
||||
setprop("/controls/switches/no-smoking-sign", 0.0);
|
||||
setprop("/controls/switches/seatbelt-sign", 0);
|
||||
setprop("/controls/switches/emer-lights", 0);
|
||||
libraries.noSmokingSwitch.setValue(0.0);
|
||||
libraries.seatbeltSwitch.setValue(0.0);
|
||||
libraries.emerLtsSwitch.setValue(0.0);
|
||||
}
|
||||
|
||||
var BUTTONS = {
|
||||
|
|
|
@ -142,6 +142,9 @@ 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");
|
||||
|
||||
|
|
|
@ -278,6 +278,13 @@ var Sim = {
|
|||
};
|
||||
|
||||
var Systems = {
|
||||
Navigation: {
|
||||
ADR: {
|
||||
Output: {
|
||||
overspeed: props.globals.getNode("/systems/navigation/adr/output/overspeed"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Thrust: {
|
||||
engOut: props.globals.getNode("/systems/thrust/eng-out"),
|
||||
state: [props.globals.getNode("/systems/thrust/state1"), props.globals.getNode("/systems/thrust/state2")],
|
||||
|
|
|
@ -128,15 +128,17 @@ var doorR4_pos = props.globals.getNode("/sim/model/door-positions/doorr4/positio
|
|||
|
||||
# Detect OFF without IN
|
||||
var lastgs0 = 0;
|
||||
#var lastgear0 = 0;
|
||||
var phase = 0;
|
||||
var gs = 0;
|
||||
var gear0 = 0;
|
||||
var lastgsrestart = 0;
|
||||
|
||||
# Check for A/C state change - advice me for a better method, please :/
|
||||
var waitingOOOIChange = maketimer(1, func(){ # 1sec precision
|
||||
|
||||
var phase = fmgc.FMGCInternal.phase;
|
||||
var gs = pts.Velocities.groundspeed.getValue();
|
||||
var gear0 = pts.Gear.wow[0].getBoolValue();
|
||||
phase = fmgc.FMGCInternal.phase;
|
||||
gs = pts.Velocities.groundspeed.getValue();
|
||||
gear0 = pts.Gear.wow[0].getBoolValue();
|
||||
|
||||
#print(sprintf("OOOI check: %d %d %.2f %s",expectedOOOIState,phase,gs,gear0));
|
||||
|
||||
|
@ -183,14 +185,14 @@ var waitingOOOIChange = maketimer(1, func(){ # 1sec precision
|
|||
expectedOOOIState = 1; # go on to OFF state
|
||||
}
|
||||
else if (gs > 9 and lastgsrestart == 0) { # try to detect OFF without IN
|
||||
lastgsrestart = int(getprop("/sim/time/elapsed-sec"));
|
||||
lastgsrestart = int(pts.Sim.Time.elapsedSec.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var engine_one_chk_OOOI = setlistener("/engines/engine[0]/state", func {
|
||||
if (getprop("/engines/engine[0]/state") == 3) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 3) {
|
||||
removelistener(engine_one_chk_OOOI);
|
||||
waitingOOOIChange.start();
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ var initInputA = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "R2") {
|
||||
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3) {
|
||||
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3 and fmgc.FMGCInternal.toFromSet == 0) {
|
||||
if (!ecam.vhf3_voice.active) {
|
||||
if (atsu.ATSU.working) {
|
||||
if (getprop("/FMGC/simbrief-username") == "") {
|
||||
|
|
|
@ -91,9 +91,9 @@ var MCDU_reset = func(i) {
|
|||
setprop("/FMGC/internal/align-ref-long-sign", "");
|
||||
setprop("/FMGC/internal/align-ref-lat-edit", 0);
|
||||
setprop("/FMGC/internal/align-ref-long-edit", 0);
|
||||
setprop("/FMGC/internal/align1-done", 0);
|
||||
setprop("/FMGC/internal/align2-done", 0);
|
||||
setprop("/FMGC/internal/align3-done", 0);
|
||||
fmgc.FMGCAlignDone[0].setValue(0);
|
||||
fmgc.FMGCAlignDone[1].setValue(0);
|
||||
fmgc.FMGCAlignDone[2].setValue(0);
|
||||
|
||||
# ROUTE SELECTION
|
||||
fmgc.FMGCInternal.altSelected = 0;
|
||||
|
|
|
@ -1913,6 +1913,21 @@
|
|||
</volume>
|
||||
</announcements>
|
||||
|
||||
<chime>
|
||||
<name>Chime</name>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/click.wav</path>
|
||||
<mode>once</mode>
|
||||
<type>avionics</type>
|
||||
<condition>
|
||||
<property>/sim/sound/warnings/click</property>
|
||||
</condition>
|
||||
<volume>
|
||||
<property>/sim/current-view/internal</property>
|
||||
</volume>
|
||||
<reference-dist>10</reference-dist>
|
||||
<max-dist>100</max-dist>
|
||||
</chime>
|
||||
|
||||
<chime>
|
||||
<name>Chime</name>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>
|
||||
|
|
Loading…
Add table
Reference in a new issue