1
0
Fork 0

FCU: improve display of characters; LVL / CH should always display also. Improve speed control range

This commit is contained in:
legoboyvdlp R 2021-06-16 13:36:36 +01:00
parent 84526a7dfe
commit 768cf4e1a0
3 changed files with 23 additions and 40 deletions

View file

@ -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>
@ -7278,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>
@ -7293,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>

View file

@ -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);
}

View file

@ -848,13 +848,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