FMGC: Fix TMPY ERASE functionality
This commit is contained in:
parent
8522565057
commit
9a92eaa0c5
2 changed files with 10 additions and 1 deletions
Nasal
|
@ -303,7 +303,7 @@ var FPLNButton = func(s, key, i) {
|
|||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
||||
if (s == "L") {
|
||||
if (key == 6 and TMPYActive[i].getBoolValue()) {
|
||||
TMPYActive[i].setBoolValue(0);
|
||||
fmgc.flightplan.eraseTempFP(i, 2);
|
||||
} else {
|
||||
if (scratchpad != "") {
|
||||
if (size(FPLNLines[i].output) >= key) {
|
||||
|
|
|
@ -81,6 +81,15 @@ var flightplan = {
|
|||
TMPYActive[f].setBoolValue(1);
|
||||
me.checkWPOutputs(f);
|
||||
},
|
||||
eraseTempFP: func(f, n) { # f is temp, n is active
|
||||
TMPYActive[f].setBoolValue(0);
|
||||
if (f == 0) {
|
||||
me.reset0();
|
||||
} else if (f == 1) {
|
||||
me.reset1();
|
||||
}
|
||||
me.checkWPOutputs(n);
|
||||
},
|
||||
executeTempFP: func(f, n) { # f is temp, n is active
|
||||
fp[n] = fp[f].clone();
|
||||
TMPYActive[f].setBoolValue(0);
|
||||
|
|
Reference in a new issue