Bugfix for save last cost index
This commit is contained in:
parent
032009a707
commit
7d5de4bad9
4 changed files with 9 additions and 9 deletions
|
@ -497,7 +497,7 @@ var taxi_b = func {
|
|||
if (pts.Instrumentation.Altimeter.std.getBoolValue()) {
|
||||
libraries.toggleSTD();
|
||||
}
|
||||
setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/pressure-sea-level-inhg"));
|
||||
setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/metar[0]/pressure-inhg") or 29.92);
|
||||
settimer(taxi_c, 2);
|
||||
}
|
||||
var taxi_c = func {
|
||||
|
|
|
@ -219,9 +219,9 @@ var fuelPredInput = func(key, i) {
|
|||
}
|
||||
|
||||
if (!getprop("/FMGC/internal/cost-index-set") and getprop("/FMGC/internal/tofrom-set")) {
|
||||
mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index"));
|
||||
mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index") or 0);
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index"));
|
||||
setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index") or 0);
|
||||
}
|
||||
}
|
||||
} else if (key == "R4") {
|
||||
|
|
|
@ -151,11 +151,6 @@ var initInputB = func(key, i) {
|
|||
if (scratchpad == "CLR") {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
} else {
|
||||
if (!getprop("/FMGC/internal/cost-index-set") and getprop("/FMGC/internal/tofrom-set")) {
|
||||
mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index"));
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index"));
|
||||
}
|
||||
var zfw_min = 80.6; #make based on performance
|
||||
var zfw_max = 134.5; #61,000 kg, make based on performance
|
||||
if (size(scratchpad) == 0) {
|
||||
|
@ -237,6 +232,12 @@ var initInputB = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
|
||||
if (!getprop("/FMGC/internal/cost-index-set") and getprop("/FMGC/internal/tofrom-set")) {
|
||||
mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index") or 0);
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index") or 0);
|
||||
}
|
||||
}
|
||||
} else if (key == "R2" and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
if (scratchpad == "CLR") {
|
||||
|
|
|
@ -59,7 +59,6 @@ var MCDU_reset = func(i) {
|
|||
setprop("/FMGC/internal/alt-set", 0);
|
||||
setprop("/FMGC/internal/cost-index", "0");
|
||||
setprop("/FMGC/internal/cost-index-set", 0);
|
||||
setprop("/FMGC/internal/last-cost-index", 0);
|
||||
setprop("/FMGC/internal/cruise-ft", 10000);
|
||||
setprop("/FMGC/internal/cruise-fl", 100);
|
||||
setprop("/FMGC/internal/cruise-lvl-set", 0);
|
||||
|
|
Loading…
Reference in a new issue