1
0
Fork 0

Corect very serious error in the block / fuel calculations

This commit is contained in:
legoboyvdlp R 2020-10-03 12:34:29 +01:00
parent 1b9f31c726
commit 3d046eea30
13 changed files with 104 additions and 6 deletions

View file

@ -2262,7 +2262,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].setColor(1, 1, 1);
if (!getprop("/FMGC/internal/fuel-request-set")) {
if (!fmgc.FMGCInternal.fuelRequest) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2305,7 +2305,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText("INIT FUEL PREDICTION ");
if (getprop("/FMGC/internal/block-calculating")) {
if (fmgc.FMGCInternal.blockCalculating) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2331,7 +2331,7 @@ var canvas_MCDU_base = {
me.colorRight("ack", "wht", "grn", "wht", "ack", "wht");
me["Simple_R3S"].setColor(GREEN);
} else {
if (!getprop("/FMGC/internal/block-confirmed")) {
if (!fmgc.FMGCInternal.blockConfirmed) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2362,7 +2362,7 @@ var canvas_MCDU_base = {
me.colorRight("ack", "blu", "amb", "wht", "ack", "wht");
me["Simple_R3S"].setColor(AMBER);
} else {
if (getprop("/FMGC/internal/fuel-calculating")) {
if (fmgc.FMGCInternal.fuelCalculating) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
if (fmgc.FMGCInternal.rteRsvSet) {
@ -2658,7 +2658,7 @@ var canvas_MCDU_base = {
me["Simple_R5S"].setText(" GW/ CG");
me["Simple_R6S"].setText("EXTRA/TIME");
if (!getprop("/FMGC/internal/fuel-request-set") or !getprop("/FMGC/internal/block-confirmed") or getprop("/FMGC/internal/fuel-calculating")) {
if (!fmgc.FMGCInternal.fuelRequest or !fmgc.FMGCInternal.blockConfirmed or fmgc.FMGCInternal.fuelCalculating) {
me["Simple_L3"].setText("---.-");
if (fmgc.FMGCInternal.rteRsvSet) {
me["Simple_C3B"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));

View file

@ -108,6 +108,9 @@ setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
var blockCalculating = props.globals.initNode("/FMGC/internal/block-calculating", 0, "BOOL");
var fuelCalculating = props.globals.initNode("/FMGC/internal/fuel-calculating", 0, "BOOL");
var FMGCinit = func {
FMGCInternal.takeoffState = 0;
FMGCInternal.minspeed = 0;
@ -1291,6 +1294,7 @@ var timer3blockFuel = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) {
#updateFuel();
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
setprop("/FMGC/internal/block-fuel-time", -99);
timer3blockFuel.stop();
}
@ -1300,6 +1304,7 @@ var timer5fuelPred = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/fuel-pred-time") + 5) {
#updateFuel();
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
setprop("/FMGC/internal/fuel-pred-time", -99);
timer5fuelPred.stop();
}

View file

@ -175,7 +175,9 @@ var SimbriefParser = {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
},

View file

@ -760,7 +760,9 @@ var flightPlanController = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
canvas_nd.A3XXRouteDriver.triggerSignal("fp-added");
},

View file

@ -438,7 +438,9 @@ var fplnPage = { # this one is only created once, and then updated - remember th
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
} else {
if (canvas_mcdu.myLatRev[me.computer] != nil) {
@ -479,7 +481,9 @@ var fplnPage = { # this one is only created once, and then updated - remember th
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
} else {
mcdu_message(me.computer, "NOT ALLOWED");

View file

@ -12,6 +12,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.rtePercent = 5.0;
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (fmgc.FMGCInternal.tripFuel != 0) {
var tf = num(scratchpad);
@ -24,6 +25,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.rtePercent = perc;
fmgc.FMGCInternal.rtePercentSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
}
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
@ -36,6 +38,7 @@ var fuelPredInput = func(key, i) {
}
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -49,6 +52,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
@ -58,6 +62,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -72,6 +77,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.finalFuelSet = 0;
fmgc.FMGCInternal.finalTimeSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
@ -80,6 +86,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.finalFuel = tf;
fmgc.FMGCInternal.finalFuelSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -91,6 +98,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.finalTime = scratchpad;
fmgc.FMGCInternal.finalTimeSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -101,6 +109,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.minDestFob = 0;
fmgc.FMGCInternal.minDestFobSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
@ -109,6 +118,7 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.minDestFob = tf;
fmgc.FMGCInternal.minDestFobSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
mcdu_message(i, "CHECK MIN DEST FOB");
@ -135,10 +145,13 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
@ -159,10 +172,13 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -189,10 +205,13 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {

View file

@ -12,7 +12,9 @@ var initInputA = func(key, i) {
fmgc.windController.updatePlans();
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
fmgc.updateARPT();
@ -28,7 +30,9 @@ var initInputA = func(key, i) {
fmgc.windController.updatePlans();
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
fmgc.updateARPT();
@ -92,7 +96,9 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzTempSet = 0;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
@ -112,7 +118,9 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzTempSet = 1;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -131,7 +139,9 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzProg = crz;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -159,7 +169,9 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzProg = crz;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -182,7 +194,9 @@ var initInputA = func(key, i) {
setprop("/FMGC/internal/align-ref-long-edit", 0);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
fmgc.flightPlanController.reset(2);
fmgc.flightPlanController.init();

View file

@ -10,8 +10,10 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.taxiFuelSet = 0;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -22,8 +24,10 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.taxiFuelSet = 1;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -40,6 +44,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.rtePercent = 5.0;
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (fmgc.FMGCInternal.tripFuel != 0) {
var tf = num(scratchpad);
@ -52,6 +57,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.rtePercent = perc;
fmgc.FMGCInternal.rtePercentSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
}
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
@ -64,6 +70,7 @@ var initInputB = func(key, i) {
}
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -77,6 +84,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
@ -86,6 +94,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -100,6 +109,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.finalFuelSet = 0;
fmgc.FMGCInternal.finalTimeSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
@ -108,6 +118,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.finalFuel = tf;
fmgc.FMGCInternal.finalFuelSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -119,6 +130,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.finalTime = scratchpad;
fmgc.FMGCInternal.finalTimeSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -129,6 +141,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.minDestFob = 0;
fmgc.FMGCInternal.minDestFobSet = 0;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
@ -137,6 +150,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.minDestFob = tf;
fmgc.FMGCInternal.minDestFobSet = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
mcdu_message(i, "CHECK MIN DEST FOB");
@ -161,12 +175,16 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
@ -185,12 +203,16 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -215,12 +237,16 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -267,7 +293,9 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.extraTime = "0000";
fmgc.FMGCInternal.fuelRequest = 0;
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -280,7 +308,9 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
}
} else if (tfs >= 1 and tfs <= 5) {
@ -291,7 +321,9 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
}
mcdu_scratchpad.scratchpads[i].empty();
@ -306,9 +338,11 @@ var initInputB = func(key, i) {
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
} else if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and fmgc.FMGCInternal.fuelRequest and !fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.blockCalculating) {
fmgc.FMGCInternal.blockConfirmed = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else {
mcdu_message(i, "NOT ALLOWED");
}
@ -318,6 +352,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tripWindValue = 0;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -328,6 +363,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tripWindValue = effwind;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -340,6 +376,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tripWindValue = effwind;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -351,6 +388,7 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.tripWindValue = scratchpad;
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {

View file

@ -127,8 +127,10 @@ var MCDU_reset = func(i) {
fmgc.FMGCInternal.extraTime = "0000";
fmgc.FMGCInternal.fuelRequest = 0;
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 0;
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
# FUELPRED
fmgc.FMGCInternal.priUtc = "0000";

View file

@ -180,7 +180,9 @@ var windCLBPage = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -318,7 +320,9 @@ var windCLBPage = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -271,7 +271,9 @@ var windCRZPage = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -506,7 +508,9 @@ var windCRZPage = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -216,7 +216,9 @@ var windDESPage = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -388,7 +390,9 @@ var windDESPage = {
# push update to fuel
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -1 +1 @@
38
39