From 7a4da944253124295957728d9e8e550ddbb913d7 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 23 Feb 2001 22:25:03 +0000 Subject: [PATCH] Added support for managing fov via the property manager so the --fov= option can work again. Removed a bit of debugging output when reading "native" IO input. --- src/Main/bfi.cxx | 13 +++++++++++++ src/Main/bfi.hxx | 2 ++ src/Network/native.cxx | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Main/bfi.cxx b/src/Main/bfi.cxx index 8b749b2bd..63687fea0 100644 --- a/src/Main/bfi.cxx +++ b/src/Main/bfi.cxx @@ -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) { diff --git a/src/Main/bfi.hxx b/src/Main/bfi.hxx index 1e8141637..dc2bd2f91 100644 --- a/src/Main/bfi.hxx +++ b/src/Main/bfi.hxx @@ -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 diff --git a/src/Network/native.cxx b/src/Network/native.cxx index 07da1e73c..e673f6438 100644 --- a/src/Network/native.cxx +++ b/src/Network/native.cxx @@ -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; } } -- 2.39.5