Update CRZ

This commit is contained in:
Joshua Davidson 2017-05-18 16:04:05 -04:00
parent d91b465b74
commit 55e46817dd
2 changed files with 20 additions and 10 deletions

View file

@ -43,6 +43,7 @@ var initInputA = func(key) {
var crz = int(scratchpad); var crz = int(scratchpad);
var crzs = size(scratchpad); var crzs = size(scratchpad);
if (crzs >= 1 and crzs <= 3) { if (crzs >= 1 and crzs <= 3) {
if (crz > 0 and crz <= 430) {
screenFlash(0.2); screenFlash(0.2);
setprop("/FMGC/internal/cruise-ft", crz * 100); setprop("/FMGC/internal/cruise-ft", crz * 100);
setprop("/FMGC/internal/cruise-fl", crz); setprop("/FMGC/internal/cruise-fl", crz);
@ -52,6 +53,10 @@ var initInputA = func(key) {
screenFlash(0.2); screenFlash(0.2);
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} }
} else {
screenFlash(0.2);
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} }
} }
} }

View file

@ -43,6 +43,7 @@ var initInputA = func(key) {
var crz = int(scratchpad); var crz = int(scratchpad);
var crzs = size(scratchpad); var crzs = size(scratchpad);
if (crzs >= 1 and crzs <= 3) { if (crzs >= 1 and crzs <= 3) {
if (crz > 0 and crz <= 430) {
screenFlash(0.2); screenFlash(0.2);
setprop("/FMGC/internal/cruise-ft", crz * 100); setprop("/FMGC/internal/cruise-ft", crz * 100);
setprop("/FMGC/internal/cruise-fl", crz); setprop("/FMGC/internal/cruise-fl", crz);
@ -52,6 +53,10 @@ var initInputA = func(key) {
screenFlash(0.2); screenFlash(0.2);
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} }
} else {
screenFlash(0.2);
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} }
} }
} }