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 130: Line 130:


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;
} } }
  } # end of disconnect announce
} # end of efis/agl check
}


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