1
0
Fork 0

Fixes to uiuc includes and initialization.

Fixes to fg_io.cxx periodic scheduler.
This commit is contained in:
curt 2000-05-23 22:08:00 +00:00
parent 9835072241
commit b543d8291e
3 changed files with 5 additions and 13 deletions

View file

@ -78,8 +78,8 @@ extern "C" void uiuc_init_aeromodel ();
extern "C" void uiuc_force_moment(double dt); extern "C" void uiuc_force_moment(double dt);
extern "C" void uiuc_engine_routine(); extern "C" void uiuc_engine_routine();
AIRCRAFT *aircraft_; AIRCRAFT *aircraft_ = new AIRCRAFT;
AIRCRAFTDIR *aircraftdir_; AIRCRAFTDIR *aircraftdir_ = new AIRCRAFTDIR;
void uiuc_init_aeromodel () void uiuc_init_aeromodel ()
{ {

View file

@ -232,9 +232,9 @@ void fgIOProcess() {
if ( p->is_enabled() ) { if ( p->is_enabled() ) {
p->dec_count_down( interval ); p->dec_count_down( interval );
if ( p->get_count_down() < 0 ) { while ( p->get_count_down() < 0 ) {
p->process(); p->process();
p->set_count_down( 1000000.0 / p->get_hz() ); p->dec_count_down( -1000000.0 / p->get_hz() );
} }
} }
} }

View file

@ -81,11 +81,6 @@
#include <Cockpit/radiostack.hxx> #include <Cockpit/radiostack.hxx>
#include <Cockpit/steam.hxx> #include <Cockpit/steam.hxx>
// bfi.hxx has to be included before uiuc_aircraft.h because of nasty
// #defines in uiuc_aircraft.h
#include "bfi.hxx"
#include <FDM/UIUCModel/uiuc_aircraft.h>
#include <FDM/UIUCModel/uiuc_aircraftdir.h> #include <FDM/UIUCModel/uiuc_aircraftdir.h>
#include <GUI/gui.h> #include <GUI/gui.h>
#include <Joystick/joystick.hxx> #include <Joystick/joystick.hxx>
@ -107,6 +102,7 @@
# include <Weather/weather.hxx> # include <Weather/weather.hxx>
#endif #endif
#include "bfi.hxx"
#include "fg_init.hxx" #include "fg_init.hxx"
#include "fg_io.hxx" #include "fg_io.hxx"
#include "keyboard.hxx" #include "keyboard.hxx"
@ -1316,10 +1312,6 @@ int main( int argc, char **argv ) {
// seed the random number generater // seed the random number generater
fg_srandom(); fg_srandom();
// AIRCRAFT defined in uiuc_aircraft.h
// AIRCRAFTDIR defined in uiuc_aircraftdir.h
aircraft_ = new AIRCRAFT;
aircraftdir_ = new AIRCRAFTDIR;
aircraft_dir = ""; // Initialize the Aircraft directory to "" (UIUC) aircraft_dir = ""; // Initialize the Aircraft directory to "" (UIUC)
// Load the configuration parameters // Load the configuration parameters