MCDU: stop calling getprop(page) literally dozens of times when a button is pushed. In addition, we switch more stuff to PTS. Slowly getting faster!
This commit is contained in:
parent
6dce8486d5
commit
1b9f31c726
15 changed files with 588 additions and 565 deletions
|
@ -2268,7 +2268,7 @@ var messages_memo = func {
|
|||
outr_tk_fuel_xfrd.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/consumables/fuel/total-fuel-lbs") < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb
|
||||
if (pts.Consumables.Fuel.totalFuelLbs.getValue() < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb
|
||||
fob_3T.active = 1;
|
||||
} else {
|
||||
fob_3T.active = 0;
|
||||
|
|
|
@ -221,6 +221,10 @@ var FMGCInternal = {
|
|||
zfwcgSet: 0,
|
||||
block: 0.0,
|
||||
blockSet: 0,
|
||||
blockCalculating: 0,
|
||||
blockConfirmed: 0,
|
||||
fuelCalculating: 0,
|
||||
fuelRequest: 0,
|
||||
taxiFuel: 0.4,
|
||||
taxiFuelSet: 0,
|
||||
tripFuel: 0,
|
||||
|
@ -281,8 +285,8 @@ setlistener("/gear/gear[0]/wow", func {
|
|||
}, 0, 0);
|
||||
|
||||
var trimReset = func {
|
||||
flaps = getprop("/controls/flight/flaps-pos");
|
||||
if (pts.Gear.wow[0].getBoolValue() and !FMGCInternal.takeoffState and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
|
||||
flaps = pts.Controls.Flight.flapsPos.getValue();
|
||||
if (pts.Gear.wow[0].getBoolValue() and !FMGCInternal.takeoffState and (flaps >= 5 or (flaps >= 4 and pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue() == 1))) {
|
||||
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
|
||||
}
|
||||
}
|
||||
|
@ -486,16 +490,16 @@ var updateFuel = func {
|
|||
}
|
||||
|
||||
# Misc fuel claclulations
|
||||
if (getprop("/FMGC/internal/block-calculating")) {
|
||||
if (fmgc.FMGCInternal.blockCalculating) {
|
||||
FMGCInternal.block = num(FMGCInternal.altFuel + FMGCInternal.finalFuel + FMGCInternal.tripFuel + FMGCInternal.rteRsv + FMGCInternal.taxiFuel);
|
||||
FMGCInternal.blockSet = 1;
|
||||
}
|
||||
fmgc.FMGCInternal.fob = num(getprop("/consumables/fuel/total-fuel-lbs") / 1000);
|
||||
fmgc.FMGCInternal.fuelPredGw = num(getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000);
|
||||
fmgc.FMGCInternal.fob = num(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000);
|
||||
fmgc.FMGCInternal.fuelPredGw = num(pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000);
|
||||
fmgc.FMGCInternal.cg = fmgc.FMGCInternal.zfwcg;
|
||||
|
||||
# Calcualte extra fuel
|
||||
if (num(getprop("/engines/engine[0]/n1-actual")) > 0 or num(getprop("/engines/engine[1]/n1-actual")) > 0) {
|
||||
if (num(pts.Engines.Engine.n1Actual[0].getValue()) > 0 or num(pts.Engines.Engine.n1Actual[1].getValue()) > 0) {
|
||||
extra_fuel = 1000 * num(FMGCInternal.fob - FMGCInternal.tripFuel - FMGCInternal.minDestFob - FMGCInternal.taxiFuel - FMGCInternal.rteRsv);
|
||||
} else {
|
||||
extra_fuel = 1000 * num(FMGCInternal.block - FMGCInternal.tripFuel - FMGCInternal.minDestFob - FMGCInternal.taxiFuel - FMGCInternal.rteRsv);
|
||||
|
@ -614,8 +618,8 @@ var radios = maketimer(1, func() {
|
|||
});
|
||||
|
||||
var masterFMGC = maketimer(0.2, func {
|
||||
n1_left = getprop("/engines/engine[0]/n1-actual");
|
||||
n1_right = getprop("/engines/engine[1]/n1-actual");
|
||||
n1_left = pts.Engines.Engine.n1Actual[0].getValue();
|
||||
n1_right = pts.Engines.Engine.n1Actual[1].getValue();
|
||||
flaps = getprop("/controls/flight/flaps-pos");
|
||||
modelat = getprop("/modes/pfd/fma/roll-mode");
|
||||
mode = getprop("/modes/pfd/fma/pitch-mode");
|
||||
|
@ -761,7 +765,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
# calculate speeds
|
||||
############################
|
||||
flap = getprop("/controls/flight/flaps-pos");
|
||||
weight_lbs = getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000;
|
||||
weight_lbs = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000;
|
||||
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
|
||||
# current speeds
|
||||
|
@ -1286,7 +1290,7 @@ var timer48gpsAlign3 = maketimer(1, func() {
|
|||
var timer3blockFuel = maketimer(1, func() {
|
||||
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) {
|
||||
#updateFuel();
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
setprop("/FMGC/internal/block-fuel-time", -99);
|
||||
timer3blockFuel.stop();
|
||||
}
|
||||
|
@ -1295,7 +1299,7 @@ var timer3blockFuel = maketimer(1, func() {
|
|||
var timer5fuelPred = maketimer(1, func() {
|
||||
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/fuel-pred-time") + 5) {
|
||||
#updateFuel();
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
setprop("/FMGC/internal/fuel-pred-time", -99);
|
||||
timer5fuelPred.stop();
|
||||
}
|
||||
|
|
|
@ -173,10 +173,10 @@ var SimbriefParser = {
|
|||
fmgc.FMGCInternal.zfw = me.store2.getChild("est_zfw").getValue() / 1000;
|
||||
fmgc.FMGCInternal.zfwSet = 1;
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
|
||||
},
|
||||
};
|
|
@ -758,9 +758,9 @@ var flightPlanController = {
|
|||
fmgc.windController.updatePlans();
|
||||
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
canvas_nd.A3XXRouteDriver.triggerSignal("fp-added");
|
||||
},
|
||||
|
|
|
@ -148,6 +148,13 @@ var Instrumentation = {
|
|||
pnlModeNum: [props.globals.initNode("/instrumentation/efis[0]/mfd/pnl_mode-num", 2, "INT"), props.globals.initNode("/instrumentation/efis[1]/mfd/pnl_mode-num", 2, "INT")],
|
||||
},
|
||||
},
|
||||
MKVII: {
|
||||
Inputs: {
|
||||
Discretes: {
|
||||
flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Nav: {
|
||||
gsDeflection: props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm"),
|
||||
locDeflection: props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm"),
|
||||
|
|
|
@ -436,9 +436,9 @@ var fplnPage = { # this one is only created once, and then updated - remember th
|
|||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
} else {
|
||||
if (canvas_mcdu.myLatRev[me.computer] != nil) {
|
||||
|
@ -477,9 +477,9 @@ var fplnPage = { # this one is only created once, and then updated - remember th
|
|||
if (dirToFlag) { dirToFlag = 0; }
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
} else {
|
||||
mcdu_message(me.computer, "NOT ALLOWED");
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
# From INIT-B
|
||||
var fuelPredInput = func(key, i) {
|
||||
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
|
||||
if (key == "L3" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
if (key == "L3" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.rteRsv = 0.05 * fmgc.FMGCInternal.tripFuel;
|
||||
fmgc.FMGCInternal.rteRsvSet = 0;
|
||||
fmgc.FMGCInternal.rtePercent = 5.0;
|
||||
fmgc.FMGCInternal.rtePercentSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (fmgc.FMGCInternal.tripFuel != 0) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -23,7 +23,7 @@ var fuelPredInput = func(key, i) {
|
|||
fmgc.FMGCInternal.rteRsvSet = 0;
|
||||
fmgc.FMGCInternal.rtePercent = perc;
|
||||
fmgc.FMGCInternal.rtePercentSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
}
|
||||
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
|
||||
|
@ -35,7 +35,7 @@ var fuelPredInput = func(key, i) {
|
|||
fmgc.FMGCInternal.rtePercent = 15.0; # need reasearch on this value
|
||||
}
|
||||
fmgc.FMGCInternal.rtePercentSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -43,12 +43,12 @@ var fuelPredInput = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "L4" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating") and fmgc.FMGCInternal.altAirportSet) {
|
||||
} else if (key == "L4" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and fmgc.FMGCInternal.altAirportSet) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.altFuel = 0.0;
|
||||
fmgc.FMGCInternal.altTime = "0000";
|
||||
fmgc.FMGCInternal.altFuelSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find(".", scratchpad) != -1) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -57,7 +57,7 @@ var fuelPredInput = func(key, i) {
|
|||
fmgc.FMGCInternal.altFuel = tf;
|
||||
fmgc.FMGCInternal.altTime = "0000";
|
||||
fmgc.FMGCInternal.altFuelSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -65,13 +65,13 @@ var fuelPredInput = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "L5" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "L5" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.finalFuel = 0.0;
|
||||
fmgc.FMGCInternal.finalTime = "0030";
|
||||
fmgc.FMGCInternal.finalFuelSet = 0;
|
||||
fmgc.FMGCInternal.finalTimeSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find(".", scratchpad) != -1) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -79,7 +79,7 @@ var fuelPredInput = func(key, i) {
|
|||
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
|
||||
fmgc.FMGCInternal.finalFuel = tf;
|
||||
fmgc.FMGCInternal.finalFuelSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -90,17 +90,17 @@ var fuelPredInput = func(key, i) {
|
|||
if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) {
|
||||
fmgc.FMGCInternal.finalTime = scratchpad;
|
||||
fmgc.FMGCInternal.finalTimeSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
}
|
||||
} else if (key == "L6" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "L6" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.minDestFob = 0;
|
||||
fmgc.FMGCInternal.minDestFobSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find(".", scratchpad) != -1) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -108,7 +108,7 @@ var fuelPredInput = func(key, i) {
|
|||
if (tfs >= 3 and tfs <= 5 and tf != nil and tf >= 0 and tf <= 80.0) {
|
||||
fmgc.FMGCInternal.minDestFob = tf;
|
||||
fmgc.FMGCInternal.minDestFobSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
|
||||
mcdu_message(i, "CHECK MIN DEST FOB");
|
||||
|
@ -119,26 +119,26 @@ var fuelPredInput = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "R3" and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "R3" and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
} else {
|
||||
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) {
|
||||
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
|
||||
var zfw = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue();
|
||||
fmgc.FMGCInternal.zfw = sprintf("%3.1f", math.round(zfw / 1000, 0.1));
|
||||
fmgc.FMGCInternal.zfwSet = 1;
|
||||
if (fmgc.FMGCInternal.blockSet != 1) {
|
||||
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
|
||||
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
|
||||
fmgc.FMGCInternal.blockSet = 1;
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
} else if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
} else if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find("/", scratchpad) != -1) {
|
||||
|
@ -154,15 +154,15 @@ var fuelPredInput = func(key, i) {
|
|||
fmgc.FMGCInternal.zfwcg = zfwcg;
|
||||
fmgc.FMGCInternal.zfwcgSet = 1;
|
||||
if (fmgc.FMGCInternal.blockSet != 1) {
|
||||
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
|
||||
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
|
||||
fmgc.FMGCInternal.blockSet = 1;
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
} else if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
} else if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -184,15 +184,15 @@ var fuelPredInput = func(key, i) {
|
|||
fmgc.FMGCInternal.zfw = scratchpad;
|
||||
fmgc.FMGCInternal.zfwSet = 1;
|
||||
if (fmgc.FMGCInternal.blockSet != 1) {
|
||||
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
|
||||
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
|
||||
fmgc.FMGCInternal.blockSet = 1;
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
} else if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
} else if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
|
|
@ -10,9 +10,9 @@ var initInputA = func(key, i) {
|
|||
fmgc.FMGCInternal.altAirport = "";
|
||||
fmgc.FMGCInternal.altAirportSet = 0;
|
||||
fmgc.windController.updatePlans();
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
fmgc.updateARPT();
|
||||
|
@ -26,9 +26,9 @@ var initInputA = func(key, i) {
|
|||
fmgc.FMGCInternal.altAirport = scratchpad;
|
||||
fmgc.FMGCInternal.altAirportSet = 1;
|
||||
fmgc.windController.updatePlans();
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
fmgc.updateARPT();
|
||||
|
@ -90,9 +90,9 @@ var initInputA = func(key, i) {
|
|||
updateCrzLvlCallback();
|
||||
fmgc.FMGCInternal.crzTemp = 15;
|
||||
fmgc.FMGCInternal.crzTempSet = 0;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find("/", scratchpad) != -1) {
|
||||
|
@ -110,9 +110,9 @@ var initInputA = func(key, i) {
|
|||
if (temp >= -99 and temp <= 99) {
|
||||
fmgc.FMGCInternal.crzTemp = temp;
|
||||
fmgc.FMGCInternal.crzTempSet = 1;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -129,9 +129,9 @@ var initInputA = func(key, i) {
|
|||
fmgc.FMGCInternal.crzTemp = temp;
|
||||
fmgc.FMGCInternal.crzTempSet = 1;
|
||||
fmgc.FMGCInternal.crzProg = crz;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -157,9 +157,9 @@ var initInputA = func(key, i) {
|
|||
fmgc.FMGCInternal.crzSet = 1;
|
||||
updateCrzLvlCallback();
|
||||
fmgc.FMGCInternal.crzProg = crz;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -180,9 +180,9 @@ var initInputA = func(key, i) {
|
|||
setprop("/FMGC/internal/align-ref-long", 0);
|
||||
setprop("/FMGC/internal/align-ref-lat-edit", 0);
|
||||
setprop("/FMGC/internal/align-ref-long-edit", 0);
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
fmgc.flightPlanController.reset(2);
|
||||
fmgc.flightPlanController.init();
|
||||
|
@ -224,7 +224,7 @@ var initInputA = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "R2") {
|
||||
if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
|
||||
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3) {
|
||||
if (!ecam.vhf3_voice.active) {
|
||||
if (atsu.ATSU.working) {
|
||||
if (getprop("/FMGC/simbrief-username") == "") {
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
var initInputB = func(key, i) {
|
||||
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
|
||||
if (key == "L1" and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
if (key == "L1" and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.taxiFuel = 0.4;
|
||||
fmgc.FMGCInternal.taxiFuelSet = 0;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
} else if (getprop("/FMGC/internal/fuel-request-set")) {
|
||||
setprop("/FMGC/internal/block-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
} else if (fmgc.FMGCInternal.fuelRequest) {
|
||||
fmgc.FMGCInternal.blockCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -20,10 +20,10 @@ var initInputB = func(key, i) {
|
|||
if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 9.9) {
|
||||
fmgc.FMGCInternal.taxiFuel = scratchpad;
|
||||
fmgc.FMGCInternal.taxiFuelSet = 1;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
} else if (getprop("/FMGC/internal/fuel-request-set")) {
|
||||
setprop("/FMGC/internal/block-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
} else if (fmgc.FMGCInternal.fuelRequest) {
|
||||
fmgc.FMGCInternal.blockCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -33,13 +33,13 @@ var initInputB = func(key, i) {
|
|||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
}
|
||||
} else if (key == "L3" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "L3" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.rteRsv = 0.05 * fmgc.FMGCInternal.tripFuel;
|
||||
fmgc.FMGCInternal.rteRsvSet = 0;
|
||||
fmgc.FMGCInternal.rtePercent = 5.0;
|
||||
fmgc.FMGCInternal.rtePercentSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (fmgc.FMGCInternal.tripFuel != 0) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -51,7 +51,7 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCInternal.rteRsvSet = 0;
|
||||
fmgc.FMGCInternal.rtePercent = perc;
|
||||
fmgc.FMGCInternal.rtePercentSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
}
|
||||
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
|
||||
|
@ -63,7 +63,7 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCInternal.rtePercent = 15.0; # need reasearch on this value
|
||||
}
|
||||
fmgc.FMGCInternal.rtePercentSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -71,12 +71,12 @@ var initInputB = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "L4" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating") and fmgc.FMGCInternal.altAirportSet) {
|
||||
} else if (key == "L4" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and fmgc.FMGCInternal.altAirportSet) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.altFuel = 0.0;
|
||||
fmgc.FMGCInternal.altTime = "0000";
|
||||
fmgc.FMGCInternal.altFuelSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find(".", scratchpad) != -1) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -85,7 +85,7 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCInternal.altFuel = tf;
|
||||
fmgc.FMGCInternal.altTime = "0000";
|
||||
fmgc.FMGCInternal.altFuelSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -93,13 +93,13 @@ var initInputB = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "L5" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "L5" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.finalFuel = 0.0;
|
||||
fmgc.FMGCInternal.finalTime = "0030";
|
||||
fmgc.FMGCInternal.finalFuelSet = 0;
|
||||
fmgc.FMGCInternal.finalTimeSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find(".", scratchpad) != -1) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -107,7 +107,7 @@ var initInputB = func(key, i) {
|
|||
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
|
||||
fmgc.FMGCInternal.finalFuel = tf;
|
||||
fmgc.FMGCInternal.finalFuelSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -118,17 +118,17 @@ var initInputB = func(key, i) {
|
|||
if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) {
|
||||
fmgc.FMGCInternal.finalTime = scratchpad;
|
||||
fmgc.FMGCInternal.finalTimeSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
}
|
||||
} else if (key == "L6" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "L6" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.minDestFob = 0;
|
||||
fmgc.FMGCInternal.minDestFobSet = 0;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find(".", scratchpad) != -1) {
|
||||
var tf = num(scratchpad);
|
||||
|
@ -136,7 +136,7 @@ var initInputB = func(key, i) {
|
|||
if (tfs >= 3 and tfs <= 5 and tf != nil and tf >= 0 and tf <= 80.0) {
|
||||
fmgc.FMGCInternal.minDestFob = tf;
|
||||
fmgc.FMGCInternal.minDestFobSet = 1;
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
|
||||
mcdu_message(i, "CHECK MIN DEST FOB");
|
||||
|
@ -147,26 +147,26 @@ var initInputB = func(key, i) {
|
|||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "R1" and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "R1" and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
} else {
|
||||
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) {
|
||||
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
|
||||
var zfw = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue();
|
||||
fmgc.FMGCInternal.zfw = sprintf("%3.1f", math.round(zfw / 1000, 0.1));
|
||||
fmgc.FMGCInternal.zfwSet = 1;
|
||||
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
|
||||
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
} else if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
} else if (getprop("/FMGC/internal/fuel-request-set")) {
|
||||
setprop("/FMGC/internal/block-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
} else if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
} else if (fmgc.FMGCInternal.fuelRequest) {
|
||||
fmgc.FMGCInternal.blockCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (find("/", scratchpad) != -1) {
|
||||
|
@ -181,16 +181,16 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCInternal.zfwSet = 1;
|
||||
fmgc.FMGCInternal.zfwcg = zfwcg;
|
||||
fmgc.FMGCInternal.zfwcgSet = 1;
|
||||
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
|
||||
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
} else if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
} else if (getprop("/FMGC/internal/fuel-request-set")) {
|
||||
setprop("/FMGC/internal/block-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
} else if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
} else if (fmgc.FMGCInternal.fuelRequest) {
|
||||
fmgc.FMGCInternal.blockCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -211,16 +211,16 @@ var initInputB = func(key, i) {
|
|||
if (scratchpad >= zfw_min and scratchpad <= zfw_max) {
|
||||
fmgc.FMGCInternal.zfw = scratchpad;
|
||||
fmgc.FMGCInternal.zfwSet = 1;
|
||||
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
|
||||
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
|
||||
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
} else if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
} else if (getprop("/FMGC/internal/fuel-request-set")) {
|
||||
setprop("/FMGC/internal/block-calculating", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
} else if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
} else if (fmgc.FMGCInternal.fuelRequest) {
|
||||
fmgc.FMGCInternal.blockCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -237,7 +237,7 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCNodes.costIndex.setValue(fmgc.FMGCInternal.costIndex);
|
||||
}
|
||||
}
|
||||
} else if (key == "R2" and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "R2" and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.block = 0.0;
|
||||
fmgc.FMGCInternal.blockSet = 0;
|
||||
|
@ -265,23 +265,23 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCInternal.fffqSensor = "FF+FQ";
|
||||
fmgc.FMGCInternal.extraFuel = 0;
|
||||
fmgc.FMGCInternal.extraTime = "0000";
|
||||
setprop("/FMGC/internal/fuel-request-set", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 0);
|
||||
fmgc.FMGCInternal.fuelRequest = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 0;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
var tfs = size(scratchpad);
|
||||
var maxblock = getprop("/options/maxblock");
|
||||
if (tfs == 0) {
|
||||
fmgc.FMGCInternal.block = sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1));
|
||||
fmgc.FMGCInternal.block = sprintf("%3.1f", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1));
|
||||
fmgc.FMGCInternal.blockSet = 1;
|
||||
if (fmgc.FMGCInternal.zfwSet) {
|
||||
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
}
|
||||
} else if (tfs >= 1 and tfs <= 5) {
|
||||
if (num(scratchpad) != nil and scratchpad >= 1.0 and scratchpad <= maxblock) {
|
||||
|
@ -289,10 +289,10 @@ var initInputB = func(key, i) {
|
|||
fmgc.FMGCInternal.blockSet = 1;
|
||||
if (fmgc.FMGCInternal.zfwSet) {
|
||||
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 0);
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 0;
|
||||
fmgc.FMGCInternal.blockConfirmed = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -303,21 +303,21 @@ var initInputB = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "R3") {
|
||||
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !getprop("/FMGC/internal/fuel-request-set")) {
|
||||
setprop("/FMGC/internal/fuel-request-set", 1);
|
||||
setprop("/FMGC/internal/block-calculating", 1);
|
||||
} else if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and getprop("/FMGC/internal/fuel-request-set") and !getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/block-calculating")) {
|
||||
setprop("/FMGC/internal/block-confirmed", 1);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !fmgc.FMGCInternal.fuelRequest) {
|
||||
fmgc.FMGCInternal.fuelRequest = 1;
|
||||
fmgc.FMGCInternal.blockCalculating = 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;
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (key == "R5" and !getprop("/FMGC/internal/fuel-calculating")) {
|
||||
} else if (key == "R5" and !fmgc.FMGCInternal.fuelCalculating) {
|
||||
if (scratchpad == "CLR") {
|
||||
fmgc.FMGCInternal.tripWind = "HD000";
|
||||
fmgc.FMGCInternal.tripWindValue = 0;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -326,8 +326,8 @@ var initInputB = func(key, i) {
|
|||
if (int(effwind) != nil and effwind >= 0 and effwind <= 500) {
|
||||
fmgc.FMGCInternal.tripWind = scratchpad;
|
||||
fmgc.FMGCInternal.tripWindValue = effwind;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -338,8 +338,8 @@ var initInputB = func(key, i) {
|
|||
if (int(effwind) != nil and effwind >= 0 and effwind <= 500) {
|
||||
fmgc.FMGCInternal.tripWind = scratchpad;
|
||||
fmgc.FMGCInternal.tripWindValue = effwind;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
@ -349,8 +349,8 @@ var initInputB = func(key, i) {
|
|||
if (num(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 500) {
|
||||
fmgc.FMGCInternal.tripWind = scratchpad;
|
||||
fmgc.FMGCInternal.tripWindValue = scratchpad;
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -178,9 +178,9 @@ var windCLBPage = {
|
|||
} else {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
}
|
||||
me.reload();
|
||||
|
@ -316,9 +316,9 @@ var windCLBPage = {
|
|||
} else {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
}
|
||||
me.reload();
|
||||
|
|
|
@ -269,9 +269,9 @@ var windCRZPage = {
|
|||
} else {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
}
|
||||
me.reload();
|
||||
|
@ -504,9 +504,9 @@ var windCRZPage = {
|
|||
} else {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
}
|
||||
me.reload();
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
||||
|
||||
var wind = nil;
|
||||
var magVar = nil;
|
||||
|
||||
var windDESPage = {
|
||||
title: nil,
|
||||
titleColour: "wht",
|
||||
|
@ -188,17 +191,18 @@ var windDESPage = {
|
|||
me.updateTmpy();
|
||||
},
|
||||
returnGRND: func() {
|
||||
var wind = fmgc.windController.des_winds[2];
|
||||
wind = fmgc.windController.des_winds[2];
|
||||
magVar = pts.Environment.magVar.getValue();
|
||||
if (wind.wind5.altitude == "GRND") {
|
||||
return [geo.normdeg(wind.wind5.heading - getprop("/environment/magnetic-variation-deg")), wind.wind5.magnitude];
|
||||
return [geo.normdeg(wind.wind5.heading - magVar), wind.wind5.magnitude];
|
||||
} else if (wind.wind4.altitude == "GRND") {
|
||||
return [geo.normdeg(wind.wind4.heading - getprop("/environment/magnetic-variation-deg")), wind.wind4.magnitude];
|
||||
return [geo.normdeg(wind.wind4.heading - magVar), wind.wind4.magnitude];
|
||||
} else if (wind.wind3.altitude == "GRND") {
|
||||
return [geo.normdeg(wind.wind3.heading - getprop("/environment/magnetic-variation-deg")), wind.wind3.magnitude];
|
||||
return [geo.normdeg(wind.wind3.heading - magVar), wind.wind3.magnitude];
|
||||
} else if (wind.wind2.altitude == "GRND") {
|
||||
return [geo.normdeg(wind.wind2.heading - getprop("/environment/magnetic-variation-deg")), wind.wind2.magnitude];
|
||||
return [geo.normdeg(wind.wind2.heading - magVar), wind.wind2.magnitude];
|
||||
} else if (wind.wind1.altitude == "GRND") {
|
||||
return [geo.normdeg(wind.wind1.heading - getprop("/environment/magnetic-variation-deg")), wind.wind1.magnitude];
|
||||
return [geo.normdeg(wind.wind1.heading - magVar), wind.wind1.magnitude];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
|
@ -210,9 +214,9 @@ var windDESPage = {
|
|||
} else {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
}
|
||||
me.reload();
|
||||
|
@ -382,9 +386,9 @@ var windDESPage = {
|
|||
} else {
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
|
||||
# push update to fuel
|
||||
if (getprop("/FMGC/internal/block-confirmed")) {
|
||||
setprop("/FMGC/internal/fuel-calculating", 0);
|
||||
setprop("/FMGC/internal/fuel-calculating", 1);
|
||||
if (fmgc.FMGCInternal.blockConfirmed) {
|
||||
fmgc.FMGCInternal.fuelCalculating = 0;
|
||||
fmgc.FMGCInternal.fuelCalculating = 1;
|
||||
}
|
||||
}
|
||||
me.reload();
|
||||
|
|
|
@ -199,7 +199,7 @@ var auto_start_one = func {
|
|||
}
|
||||
|
||||
var eng_one_auto_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 22) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 22) {
|
||||
eng_one_auto_start.stop();
|
||||
setprop("/engines/engine[0]/state", 2);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
||||
|
@ -219,7 +219,7 @@ var eng_one_auto_start = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_one_man_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
|
||||
eng_one_man_start.stop();
|
||||
setprop("/engines/engine[0]/state", 2);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
||||
|
@ -239,7 +239,7 @@ var eng_one_egt_check = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_one_n2_check = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
|
||||
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
|
||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ var eng_one_n2_check = maketimer(0.5, func {
|
|||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
||||
}
|
||||
}
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
|
||||
eng_one_n2_check.stop();
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
setprop("/engines/engine[0]/state", 3);
|
||||
|
@ -262,7 +262,7 @@ var auto_start_two = func {
|
|||
}
|
||||
|
||||
var eng_two_auto_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 22) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 22) {
|
||||
eng_two_auto_start.stop();
|
||||
setprop("/engines/engine[1]/state", 2);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
||||
|
@ -282,7 +282,7 @@ var eng_two_auto_start = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_two_man_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
|
||||
eng_two_man_start.stop();
|
||||
setprop("/engines/engine[1]/state", 2);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
||||
|
@ -302,7 +302,7 @@ var eng_two_egt_check = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_two_n2_check = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 50.0) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 50.0) {
|
||||
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
|
||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ var eng_two_n2_check = maketimer(0.5, func {
|
|||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
||||
}
|
||||
}
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
|
||||
eng_two_n2_check.stop();
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
setprop("/engines/engine[1]/state", 3);
|
||||
|
|
|
@ -199,7 +199,7 @@ var auto_start_one = func {
|
|||
}
|
||||
|
||||
var eng_one_auto_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
|
||||
if (pts.Engines.Engine.n1Actual[0].getValue() >= 4.7) {
|
||||
eng_one_auto_start.stop();
|
||||
setprop("/engines/engine[0]/state", 2);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
||||
|
@ -219,7 +219,7 @@ var eng_one_auto_start = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_one_man_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
|
||||
eng_one_man_start.stop();
|
||||
setprop("/engines/engine[0]/state", 2);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
||||
|
@ -239,7 +239,7 @@ var eng_one_egt_check = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_one_n2_check = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
|
||||
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
|
||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ var eng_one_n2_check = maketimer(0.5, func {
|
|||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
||||
}
|
||||
}
|
||||
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
|
||||
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
|
||||
eng_one_n2_check.stop();
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
setprop("/engines/engine[0]/state", 3);
|
||||
|
@ -262,7 +262,7 @@ var auto_start_two = func {
|
|||
}
|
||||
|
||||
var eng_two_auto_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
|
||||
if (pts.Engines.Engine.n1Actual[1].getValue() >= 4.7) {
|
||||
eng_two_auto_start.stop();
|
||||
setprop("/engines/engine[1]/state", 2);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
||||
|
@ -282,7 +282,7 @@ var eng_two_auto_start = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_two_man_start = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
|
||||
eng_two_man_start.stop();
|
||||
setprop("/engines/engine[1]/state", 2);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
||||
|
@ -302,7 +302,7 @@ var eng_two_egt_check = maketimer(0.5, func {
|
|||
});
|
||||
|
||||
var eng_two_n2_check = maketimer(0.5, func {
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 43.0) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 43.0) {
|
||||
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
|
||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ var eng_two_n2_check = maketimer(0.5, func {
|
|||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
||||
}
|
||||
}
|
||||
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
|
||||
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
|
||||
eng_two_n2_check.stop();
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
setprop("/engines/engine[1]/state", 3);
|
||||
|
|
Loading…
Reference in a new issue