Fix issue #240
This commit is contained in:
parent
58c59d2c02
commit
3dce3ef1ea
1 changed files with 12 additions and 12 deletions
|
@ -138,10 +138,10 @@ var initInputA = func(key, i) {
|
|||
} else if (find("/", scratchpad) != -1) {
|
||||
var crztemp = split("/", scratchpad);
|
||||
if (find("FL", crztemp[0]) != -1) {
|
||||
var crz = int(substr(crztemp[0], 2));
|
||||
var crz = substr(crztemp[0], 2);
|
||||
var crzs = size(substr(crztemp[0], 2));
|
||||
} else {
|
||||
var crz = int(crztemp[0]);
|
||||
var crz = crztemp[0];
|
||||
var crzs = size(crztemp[0]);
|
||||
}
|
||||
var temp = int(crztemp[1]);
|
||||
|
@ -160,17 +160,17 @@ var initInputA = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) {
|
||||
} else if (find(".", crz) == -1 and crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) {
|
||||
if (crz > 0 and crz <= 390 and temp >= -99 and temp <= 99) {
|
||||
fmgc.FMGCInternal.crzFt = crz * 100;
|
||||
fmgc.FMGCInternal.crzFl = crz;
|
||||
fmgc.FMGCInternal.crzFt = int(crz) * 100;
|
||||
fmgc.FMGCInternal.crzFl = int(crz);
|
||||
fmgc.altvert();
|
||||
fmgc.updateRouteManagerAlt();
|
||||
fmgc.FMGCInternal.crzSet = 1;
|
||||
updateCrzLvlCallback();
|
||||
fmgc.FMGCInternal.crzTemp = temp;
|
||||
fmgc.FMGCInternal.crzTempSet = 1;
|
||||
fmgc.FMGCInternal.crzProg = crz;
|
||||
fmgc.FMGCInternal.crzProg = int(crz);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.fuelCalculating.setValue(0);
|
||||
|
@ -186,21 +186,21 @@ var initInputA = func(key, i) {
|
|||
}
|
||||
} else {
|
||||
if (find("FL", scratchpad) != -1) {
|
||||
var crz = int(substr(scratchpad, 2));
|
||||
var crz = substr(scratchpad, 2);
|
||||
var crzs = size(substr(scratchpad, 2));
|
||||
} else {
|
||||
var crz = int(scratchpad);
|
||||
var crz = scratchpad;
|
||||
var crzs = size(scratchpad);
|
||||
}
|
||||
if (crzs >= 1 and crzs <= 3 and crz != nil) {
|
||||
if (find(".", crz) == -1 and crzs >= 1 and crzs <= 3 and crz != nil) {
|
||||
if (crz > 0 and crz <= 390) {
|
||||
fmgc.FMGCInternal.crzFt = crz * 100;
|
||||
fmgc.FMGCInternal.crzFl = crz;
|
||||
fmgc.FMGCInternal.crzFt = int(crz) * 100;
|
||||
fmgc.FMGCInternal.crzFl = int(crz);
|
||||
fmgc.altvert();
|
||||
fmgc.updateRouteManagerAlt();
|
||||
fmgc.FMGCInternal.crzSet = 1;
|
||||
updateCrzLvlCallback();
|
||||
fmgc.FMGCInternal.crzProg = crz;
|
||||
fmgc.FMGCInternal.crzProg = int(crz);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.fuelCalculating.setValue(0);
|
||||
|
|
Loading…
Reference in a new issue