Add contraints
This commit is contained in:
parent
3c8402dbbc
commit
efc771c89e
1 changed files with 14 additions and 7 deletions
|
@ -147,14 +147,21 @@ var windCLBPage = {
|
|||
if (size(me.windList) >= index) {
|
||||
if (size(mcdu_scratchpad.scratchpads[me.computer].scratchpad) == 13) {
|
||||
var winds = split("/", mcdu_scratchpad.scratchpads[me.computer].scratchpad);
|
||||
me.windList[index - 1] = [winds[0], winds[1], winds[2]];
|
||||
mcdu_scratchpad.scratchpads[me.computer].empty();
|
||||
if (index != 5) {
|
||||
append(me.windList, nil);
|
||||
if (size(winds[0]) == 3 and num(winds[0]) != nil and winds[0] >= 0 and winds[0] <= 360 and
|
||||
size(winds[1]) == 3 and num(winds[1]) != nil and winds[1] >= 0 and winds[1] <= 200 and
|
||||
size(winds[2]) == 5 and ((num(winds[2]) != nil and winds[2] >= 1000 and winds[2] <= 39000) or
|
||||
(num(split("FL", winds[2])[1]) != nil and split("FL", winds[2])[1] >= 10 and split("FL", winds[2])[1] <= 390))) {
|
||||
me.windList[index - 1] = [winds[0], winds[1], winds[2]];
|
||||
mcdu_scratchpad.scratchpads[me.computer].empty();
|
||||
if (index != 5) {
|
||||
append(me.windList, nil);
|
||||
}
|
||||
me._setupPageWithData();
|
||||
me.makeTmpy();
|
||||
me.updateTmpy();
|
||||
} else {
|
||||
mcdu_message(me.computer, "NOT ALLOWED");
|
||||
}
|
||||
me._setupPageWithData();
|
||||
me.makeTmpy();
|
||||
me.updateTmpy();
|
||||
} else {
|
||||
mcdu_message(me.computer, "NOT ALLOWED");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue