Fixes to uiuc includes and initialization.
Fixes to fg_io.cxx periodic scheduler.
This commit is contained in:
parent
9835072241
commit
b543d8291e
3 changed files with 5 additions and 13 deletions
|
@ -78,8 +78,8 @@ extern "C" void uiuc_init_aeromodel ();
|
|||
extern "C" void uiuc_force_moment(double dt);
|
||||
extern "C" void uiuc_engine_routine();
|
||||
|
||||
AIRCRAFT *aircraft_;
|
||||
AIRCRAFTDIR *aircraftdir_;
|
||||
AIRCRAFT *aircraft_ = new AIRCRAFT;
|
||||
AIRCRAFTDIR *aircraftdir_ = new AIRCRAFTDIR;
|
||||
|
||||
void uiuc_init_aeromodel ()
|
||||
{
|
||||
|
|
|
@ -232,9 +232,9 @@ void fgIOProcess() {
|
|||
|
||||
if ( p->is_enabled() ) {
|
||||
p->dec_count_down( interval );
|
||||
if ( p->get_count_down() < 0 ) {
|
||||
while ( p->get_count_down() < 0 ) {
|
||||
p->process();
|
||||
p->set_count_down( 1000000.0 / p->get_hz() );
|
||||
p->dec_count_down( -1000000.0 / p->get_hz() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,11 +81,6 @@
|
|||
#include <Cockpit/radiostack.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 <GUI/gui.h>
|
||||
#include <Joystick/joystick.hxx>
|
||||
|
@ -107,6 +102,7 @@
|
|||
# include <Weather/weather.hxx>
|
||||
#endif
|
||||
|
||||
#include "bfi.hxx"
|
||||
#include "fg_init.hxx"
|
||||
#include "fg_io.hxx"
|
||||
#include "keyboard.hxx"
|
||||
|
@ -1316,10 +1312,6 @@ int main( int argc, char **argv ) {
|
|||
// seed the random number generater
|
||||
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)
|
||||
|
||||
// Load the configuration parameters
|
||||
|
|
Loading…
Reference in a new issue