Howto:Implement a Fly-By-Wire System for Airliners: Difference between revisions

m
m (→‎/Nasal/fbw.nas: initialize fpsfix, use var keyword, simplify conditional block)
m (→‎/Nasal/fbw.nas: formatting)
Line 138: Line 138:


if (getprop("/systems/electrical/outputs/efis") != nil) {
if (getprop("/systems/electrical/outputs/efis") != nil) {
if ((getprop("/systems/electrical/outputs/efis") < 9) and (altitudeagl >= 200)) {
if ((getprop("/systems/electrical/outputs/efis") < 9) and (altitudeagl >= 200)) {
setprop("/controls/fbw/active", 0);
  setprop("/controls/fbw/active", 0);
if (me.disconnectannounce == 0) {
  if (me.disconnectannounce == 0) {
screen.log.write("Fly By Wire Disconnected!", 1, 0, 0);
  screen.log.write("Fly By Wire Disconnected!", 1, 0, 0);
me.disconnectannounce = 1;
  me.disconnectannounce = 1;
} } }
  } # of disconnectannounce
} # if efis < 9 and AGL alt >= 200
}


if (getprop("/controls/fbw/active")) {
if (getprop("/controls/fbw/active")) {