X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fmain.cxx;h=68535fc6dbebda37d415f8a9094726db0b38b5a6;hb=db89ecfae80aa8d62844e39b7aa5f31b67c25e48;hp=f1d9ad8f6cfa73b213ae4372ef98f733b47d5bc1;hpb=96c20e65326d70d55612c11d613e058520517999;p=flightgear.git diff --git a/src/Main/main.cxx b/src/Main/main.cxx index f1d9ad8f6..68535fc6d 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -76,8 +76,9 @@ #include #include -#include +#include #include +#include #include #include #include @@ -663,7 +664,7 @@ void fgUpdateTimeDepCalcs(int multi_loop, int remainder) { if ( !t->getPause() ) { // run Autopilot system - fgAPRun(); + current_autopilot->run(); // printf("updating flight model x %d\n", multi_loop); /* fgFDMUpdate( current_options.get_flight_model(), @@ -742,6 +743,11 @@ void fgUpdateTimeDepCalcs(int multi_loop, int remainder) { // Update solar system ephem->update( t, cur_fdm_state->get_Latitude() ); + + // Update radio stack model + current_radiostack->update( cur_fdm_state->get_Longitude(), + cur_fdm_state->get_Latitude(), + cur_fdm_state->get_Altitude() * FEET_TO_METER ); } @@ -1162,9 +1168,6 @@ void fgReshape( int width, int height ) { // the main loop, so this will now work without seg faulting // the system. current_view.UpdateViewParams(cur_view_fdm); - if ( current_options.get_panel_status() ) { - FGPanel::OurPanel->ReInit(0, 0, 1024, 768); - } } } @@ -1285,6 +1288,8 @@ int fgGlutInitEvents( void ) { int main( int argc, char **argv ) { #if defined( MACOS ) + freopen ("stdout.txt", "w", stdout ); + freopen ("stderr.txt", "w", stderr ); argc = ccommand( &argv ); #endif