Fix "АБСУ: не отключать АТ при перемещении отключенного МЭТ." not disconnecting AT if throttle = 0

parent 67d21a30
......@@ -106,16 +106,19 @@ TrimDo = func () {
# @brief Set throttle.
# @param eng Engine, 0..4.
# @param throttle Throttle, 0..90 degrees.
Throttle = func (eng, throttle) {
# @param disconnect_at Always disconnect AT, even if throttle is the same.
Throttle = func (eng, throttle, disconnect_at = 1) {
var diff = (throttle / 90.0) - getprop("/controls/engines/engine[" ~ eng ~ "]/throttle");
controls.incThrottle(diff, 0.0);
setprop("/fdm/jsbsim/fcs/throttle-moving-down[" ~ eng ~ "]", disconnect_at);
}
# @brief Set throttle for all engines.
# @param throttle Throttle, 0..90 degrees.
ThrottleAll = func (throttle) {
# @param disconnect_at Always disconnect AT, even if throttle is the same.
ThrottleAll = func (throttle, disconnect_at = 1) {
for(var ii = 0; ii < 4; ii += 1){
Throttle(ii, throttle);
Throttle(ii, throttle, disconnect_at);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment