20,741
edits
m (→/Nasal/fbw.nas: use methods to increment and decrement the throttles) |
m (→/Nasal/fbw.nas: start using the new methods to increment/decrement throttles) |
||
Line 254: | Line 254: | ||
if (me.throttles[0] <= me.throttleinit - 0.05) { | if (me.throttles[0] <= me.throttleinit - 0.05) { | ||
me. | me.inc_throttles(); | ||
} elsif (me.throttles[0] > me.throttleinit + 0.05) { | } elsif (me.throttles[0] > me.throttleinit + 0.05) { | ||
me. | me.dec_throttles(); | ||
} else me.turnthrottlefix = 0; | } else me.turnthrottlefix = 0; | ||
} | } | ||
Line 265: | Line 263: | ||
if ((airspeedkt >= 250) and (altitudemsl <= 10000) and (me.throttles[0] != 0) and (me.throttles[1] != 0)) { | if ((airspeedkt >= 250) and (altitudemsl <= 10000) and (me.throttles[0] != 0) and (me.throttles[1] != 0)) { | ||
me. | me.dec_throttles(); | ||
me.throttlefix = 1; | me.throttlefix = 1; | ||
} | } | ||
if ((me.throttlefix == 1) and (airspeedkt < 245) and (altitudemsl <= 10000) and (me.throttles[0] != 1) and (throttles[1] != 1)) { | if ((me.throttlefix == 1) and (airspeedkt < 245) and (altitudemsl <= 10000) and (me.throttles[0] != 1) and (throttles[1] != 1)) { | ||
me. | me.inc_throttles(); | ||
} | } | ||
Line 278: | Line 274: | ||
if ((airspeedkt >= 350) and (altitudemsl > 10000) and (throttles[0] != 0) and (throttles[1] != 0)) { | if ((airspeedkt >= 350) and (altitudemsl > 10000) and (throttles[0] != 0) and (throttles[1] != 0)) { | ||
me.dec_throttles(); | |||
me.throttlefix = 1; | me.throttlefix = 1; | ||
} | } | ||
if ((me.throttlefix == 1) and (airspeedkt < 340) and (altitudemsl > 10000) and (throttles[0] != 1) and (throttles[1] != 1)) { | if ((me.throttlefix == 1) and (airspeedkt < 340) and (altitudemsl > 10000) and (throttles[0] != 1) and (throttles[1] != 1)) { | ||
me.inc_throttles(); | |||
} | } | ||
Line 291: | Line 285: | ||
if ((airspeedkt < 125) and (me.altitudeagl > 250) and (throttles[0] != 1) and (throttles[1] != 1)) { | if ((airspeedkt < 125) and (me.altitudeagl > 250) and (throttles[0] != 1) and (throttles[1] != 1)) { | ||
me.inc_throttles(); | |||
### Also help by pushing forward on the stick | ### Also help by pushing forward on the stick | ||
Line 413: | Line 406: | ||
inc_throttles: func { | inc_throttles: func { | ||
forindex(var t; me.throttles) | forindex(var t; me.throttles) | ||
throttles[t] += INCREMENT * me.fpsfix; | me.throttles[t] += INCREMENT * me.fpsfix; | ||
}, | }, | ||
dec_throttles:func { | dec_throttles:func { | ||
forindex(var t; me.throttles) | forindex(var t; me.throttles) | ||
throttles[t] -= INCREMENT * me.fpsfix; | me.throttles[t] -= INCREMENT * me.fpsfix; | ||
}, | }, | ||
reset : func { | reset : func { |