]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bfi.cxx
Fixed a problem with autodetecting if we need to draw our own mouse cursor
[flightgear.git] / src / Main / bfi.cxx
index 8b749b2bdee84887e6d8021057b00c9a946b2ca7..84619534383c3365000b807b5271d1e7be157ac8 100644 (file)
@@ -167,6 +167,7 @@ _set_view_from_axes ()
 // Local functions
 ////////////////////////////////////////////////////////////////////////
 
+
 /**
  * Initialize the BFI by binding its functions to properties.
  *
@@ -197,7 +198,7 @@ FGBFI::init ()
   fgTie("/autopilot/settings/altitude", getAPAltitude, setAPAltitude);
   fgTie("/autopilot/locks/heading", getAPHeadingLock, setAPHeadingLock);
   fgTie("/autopilot/settings/heading", getAPHeading, setAPHeading);
-  fgTie("/autopilot/settings/heading-dg", getAPHeadingDG, setAPHeadingDG);
+  fgTie("/autopilot/settings/heading-dg", getAPHeadingDG, setAPHeadingDG, false);
   fgTie("/autopilot/settings/heading-magnetic",
              getAPHeadingMag, setAPHeadingMag);
   fgTie("/autopilot/locks/nav1", getAPNAV1Lock, setAPNAV1Lock);
@@ -209,6 +210,7 @@ FGBFI::init ()
   fgTie("/environment/wind-down", getWindDown, setWindDown);
 
                                // View
+  fgTie("/sim/field-of-view", getFOV, setFOV);
   fgTie("/sim/view/axes/long", (double(*)())0, setViewAxisLong);
   fgTie("/sim/view/axes/lat", (double(*)())0, setViewAxisLat);
 
@@ -1004,7 +1006,7 @@ FGBFI::getAPHeadingLock ()
 {
     return
       (current_autopilot->get_HeadingEnabled() &&
-       current_autopilot->get_HeadingMode() == FGAutopilot::FG_HEADING_LOCK);
+       current_autopilot->get_HeadingMode() == FGAutopilot::FG_DG_HEADING_LOCK);
 }
 
 
@@ -1020,11 +1022,11 @@ FGBFI::setAPHeadingLock (bool lock)
                                // heading other than the current
                                // heading.
     double heading = getAPHeadingMag();
-    current_autopilot->set_HeadingMode(FGAutopilot::FG_HEADING_LOCK);
+    current_autopilot->set_HeadingMode(FGAutopilot::FG_DG_HEADING_LOCK);
     current_autopilot->set_HeadingEnabled(true);
     setAPHeadingMag(heading);
   } else if (current_autopilot->get_HeadingMode() ==
-            FGAutopilot::FG_HEADING_LOCK) {
+            FGAutopilot::FG_DG_HEADING_LOCK) {
     current_autopilot->set_HeadingEnabled(false);
   }
 }
@@ -1289,6 +1291,18 @@ FGBFI::setWindDown (double speed)
 // View.
 ////////////////////////////////////////////////////////////////////////
 
+double
+FGBFI::getFOV ()
+{
+  globals->get_current_view()->get_fov();
+}
+
+void
+FGBFI::setFOV (double fov)
+{
+  globals->get_current_view()->set_fov( fov );
+}
+
 void
 FGBFI::setViewAxisLong (double axis)
 {