1
0
Fork 0

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.
This commit is contained in:
curt 2001-02-23 22:25:03 +00:00
parent f780c27787
commit 7a4da94425
3 changed files with 17 additions and 2 deletions

View 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)
{

View 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

View 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;
}
}