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,11 +43,16 @@ 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) {
screenFlash(0.2); if (crz > 0 and crz <= 430) {
setprop("/FMGC/internal/cruise-ft", crz * 100); screenFlash(0.2);
setprop("/FMGC/internal/cruise-fl", crz); setprop("/FMGC/internal/cruise-ft", crz * 100);
setprop("/FMGC/internal/cruise-lvl-set", 1); setprop("/FMGC/internal/cruise-fl", crz);
setprop("/MCDU[0]/scratchpad", ""); setprop("/FMGC/internal/cruise-lvl-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
screenFlash(0.2);
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else { } else {
screenFlash(0.2); screenFlash(0.2);
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");

View file

@ -43,11 +43,16 @@ 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) {
screenFlash(0.2); if (crz > 0 and crz <= 430) {
setprop("/FMGC/internal/cruise-ft", crz * 100); screenFlash(0.2);
setprop("/FMGC/internal/cruise-fl", crz); setprop("/FMGC/internal/cruise-ft", crz * 100);
setprop("/FMGC/internal/cruise-lvl-set", 1); setprop("/FMGC/internal/cruise-fl", crz);
setprop("/MCDU[1]/scratchpad", ""); setprop("/FMGC/internal/cruise-lvl-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
screenFlash(0.2);
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else { } else {
screenFlash(0.2); screenFlash(0.2);
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");