A3XX: Make MMO influence maxspeed bar, Possibly fix #102
This commit is contained in:
parent
4f4079e2ba
commit
04de02dfbd
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue