A3XX: Make MMO influence maxspeed bar, Possibly fix #102

This commit is contained in:
Joshua Davidson 2017-11-28 10:58:25 -05:00
parent 4f4079e2ba
commit 04de02dfbd

View file

@ -117,6 +117,7 @@ setlistener("/sim/signals/fdm-initialized", func {
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
var mmoIAS = 0;
});
var FMGCinit = func {
@ -269,8 +270,13 @@ var masterFMGC = maketimer(0.2, func {
}
flap = getprop("/controls/flight/flap-pos");
mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
if (flap == 0) { # 0
setprop("/FMGC/internal/maxspeed", 350);
if (mmoIAS > 350) {
setprop("/FMGC/internal/maxspeed", mmoIAS);
} else {
setprop("/FMGC/internal/maxspeed", 350);
}
setprop("/FMGC/internal/minspeed", 202);
} else if (flap == 1) { # 1
setprop("/FMGC/internal/maxspeed", 230);