]> git.mxchange.org Git - flightgear.git/commitdiff
Added support for managing fov via the property manager so the --fov= option
authorcurt <curt>
Fri, 23 Feb 2001 22:25:03 +0000 (22:25 +0000)
committercurt <curt>
Fri, 23 Feb 2001 22:25:03 +0000 (22:25 +0000)
can work again.
Removed a bit of debugging output when reading "native" IO input.

src/Main/bfi.cxx
src/Main/bfi.hxx
src/Network/native.cxx

index 8b749b2bdee84887e6d8021057b00c9a946b2ca7..63687fea0d9cc513f6d956a59fd5e9543fbd1c6d 100644 (file)
@@ -209,6 +209,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);
 
@@ -1289,6 +1290,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)
 {
index 1e81416379669754112b6da4a4ee205a9f093bf7..dc2bd2f91ac847acd42bf58f0e5a85e11a07e8f0 100644 (file)
@@ -170,6 +170,8 @@ public:
   static void setWindDown (double speed); // feet/second
 
                                // View
+  static double getFOV ();     // degrees
+  static void setFOV (double fov); // degrees
   static void setViewAxisLong (double axis);// -1.0:1.0
   static void setViewAxisLat (double axis); // -1.0:1.0
 
index 07da1e73cb739c66d811f4dc77b77eee95d674e3..e673f6438f8782e85a5e4acfa1de41f239b221ef 100644 (file)
@@ -70,12 +70,12 @@ bool FGNative::process() {
     } else if ( get_direction() == SG_IO_IN ) {
        if ( io->get_type() == sgFileType ) {
            if ( io->read( (char *)(& buf), length ) == length ) {
-               FG_LOG( FG_IO, FG_ALERT, "Success reading data." );
+               FG_LOG( FG_IO, FG_DEBUG, "Success reading data." );
                *cur_fdm_state = buf;
            }
        } else {
            while ( io->read( (char *)(& buf), length ) == length ) {
-               FG_LOG( FG_IO, FG_ALERT, "Success reading data." );
+               FG_LOG( FG_IO, FG_DEBUG, "Success reading data." );
                *cur_fdm_state = buf;
            }
        }