A3XX: Add dynamic block limits

This commit is contained in:
Joshua Davidson 2017-06-14 20:07:01 -04:00
parent 4113260d3b
commit c422fce981
10 changed files with 22 additions and 12 deletions

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">0</EIS2>
<eng>CFM</eng>
<maxblock>52.3</maxblock>
</options>
<sharklet type="bool">0</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">0</EIS2>
<eng>IAE</eng>
<maxblock>52.3</maxblock>
</options>
<sharklet type="bool">0</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">0</EIS2>
<eng>CFM</eng>
<maxblock>52.3</maxblock>
</options>
<sharklet type="bool">0</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">0</EIS2>
<eng>IAE</eng>
<maxblock>52.3</maxblock>
</options>
<sharklet type="bool">0</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">1</EIS2>
<eng>CFM</eng>
<maxblock>52.3</maxblock>
</options>
<sharklet type="bool">1</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">0</EIS2>
<eng>CFM</eng>
<maxblock>52.0</maxblock>
</options>
<sharklet type="bool">0</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">0</EIS2>
<eng>IAE</eng>
<maxblock>52.0</maxblock>
</options>
<sharklet type="bool">0</sharklet>

View file

@ -103,9 +103,10 @@
</sim>
<options>
<options n="0">
<EIS2 type="bool">1</EIS2>
<eng>CFM</eng>
<maxblock>52.0</maxblock>
</options>
<sharklet type="bool">1</sharklet>

View file

@ -453,8 +453,9 @@ var initInputB = func(key) {
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 2 or tfs == 4) {
if (scratchpad >= 1.0 and scratchpad <= 45.0) {
var maxblock = getprop("/options/maxblock");
if (tfs == 2 or tfs == 4 or tfs == 5) {
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
setprop("/FMGC/internal/block", scratchpad);
setprop("/FMGC/internal/block-set", 1);
setprop("/MCDU[0]/scratchpad", "");

View file

@ -453,8 +453,9 @@ var initInputB = func(key) {
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 2 or tfs == 4) {
if (scratchpad >= 1.0 and scratchpad <= 45.0) {
var maxblock = getprop("/options/maxblock");
if (tfs == 2 or tfs == 4 or tfs == 5) {
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
setprop("/FMGC/internal/block", scratchpad);
setprop("/FMGC/internal/block-set", 1);
setprop("/MCDU[1]/scratchpad", "");