Tweaks from Julian Foad:
1. Enable auto-configure on more versions of auto tools. (configure.in) 2. Warnings from auto-configure tools. (src/Time/Makefile.am) 3. Typo: "the it's" -> "its". (docs-mini/README.Joystick) 4. Remove definition of FGViewer::update() that now is (or can be) pure virtual\ . (src/Main/viewer.cxx) 5. Preferred form of function name according to comments in plib: "not_working"\ -> "notWorking". (src/Sound/soundmgr.hxx)
This commit is contained in:
parent
847b968816
commit
4324010074
14 changed files with 1121 additions and 36 deletions
|
@ -54,7 +54,7 @@ In case you were wondering, XML stands for eXtensible Markup Language.
|
||||||
It looks a lot like HTML, except you get to define your own tags. Well,
|
It looks a lot like HTML, except you get to define your own tags. Well,
|
||||||
in the case of FGFS we defined the tags you need to configure things.
|
in the case of FGFS we defined the tags you need to configure things.
|
||||||
It is well suited for describing hierarchically organized structures, such as
|
It is well suited for describing hierarchically organized structures, such as
|
||||||
the property tree FGFS uses to expose the it's innards to external applications.
|
the property tree FGFS uses to expose it's innards to external applications.
|
||||||
Your XML configuration files for FGFS must start and end with the following
|
Your XML configuration files for FGFS must start and end with the following
|
||||||
pair of tags.
|
pair of tags.
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
|
|
|
@ -244,7 +244,7 @@ FGRadioStack::bind ()
|
||||||
|
|
||||||
// User inputs
|
// User inputs
|
||||||
fgTie("/radios/dme/frequencies/selected-khz", this,
|
fgTie("/radios/dme/frequencies/selected-khz", this,
|
||||||
&FGRadioStack::get_dme_freq, &FGRadioStack::set_adf_freq);
|
&FGRadioStack::get_dme_freq, &FGRadioStack::set_dme_freq);
|
||||||
|
|
||||||
// Radio outputs
|
// Radio outputs
|
||||||
fgTie("/radios/dme/in-range", this, &FGRadioStack::get_dme_inrange);
|
fgTie("/radios/dme/in-range", this, &FGRadioStack::get_dme_inrange);
|
||||||
|
|
|
@ -275,7 +275,7 @@ void FGSteam::_CatchUp()
|
||||||
AccE = current_aircraft.fdm_state->get_V_dot_east();
|
AccE = current_aircraft.fdm_state->get_V_dot_east();
|
||||||
AccU = current_aircraft.fdm_state->get_V_dot_down()
|
AccU = current_aircraft.fdm_state->get_V_dot_down()
|
||||||
- 9.81 / 0.3;
|
- 9.81 / 0.3;
|
||||||
if ( fabs(the_TC_rad) > 0.2 )
|
if ( fabs(the_TC_rad) > 0.2 /* 2.0 */ )
|
||||||
{ /* Massive sideslip jams it; it stops turning */
|
{ /* Massive sideslip jams it; it stops turning */
|
||||||
the_MH_degps = 0.0;
|
the_MH_degps = 0.0;
|
||||||
the_MH_err = fgGetDouble("/orientation/heading-deg") - the_MH_deg;
|
the_MH_err = fgGetDouble("/orientation/heading-deg") - the_MH_deg;
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <simgear/timing/timestamp.hxx>
|
#include <simgear/timing/timestamp.hxx>
|
||||||
|
|
||||||
#include <Network/protocol.hxx>
|
#include <Network/protocol.hxx>
|
||||||
|
#include <Network/atc610x.hxx>
|
||||||
#include <Network/atlas.hxx>
|
#include <Network/atlas.hxx>
|
||||||
#include <Network/garmin.hxx>
|
#include <Network/garmin.hxx>
|
||||||
#include <Network/httpd.hxx>
|
#include <Network/httpd.hxx>
|
||||||
|
@ -85,7 +86,12 @@ static FGProtocol *parse_port_config( const string& config )
|
||||||
SG_LOG( SG_IO, SG_INFO, " protocol = " << protocol );
|
SG_LOG( SG_IO, SG_INFO, " protocol = " << protocol );
|
||||||
|
|
||||||
FGProtocol *io;
|
FGProtocol *io;
|
||||||
if ( protocol == "atlas" ) {
|
if ( protocol == "atc610x" ) {
|
||||||
|
FGATC610x *atc610x = new FGATC610x;
|
||||||
|
io = atc610x;
|
||||||
|
short_circuit = true;
|
||||||
|
cout << "here ..." << endl;
|
||||||
|
} else if ( protocol == "atlas" ) {
|
||||||
FGAtlas *atlas = new FGAtlas;
|
FGAtlas *atlas = new FGAtlas;
|
||||||
io = atlas;
|
io = atlas;
|
||||||
} else if ( protocol == "opengc" ) {
|
} else if ( protocol == "opengc" ) {
|
||||||
|
|
|
@ -517,25 +517,6 @@ void fgRenderFrame( void ) {
|
||||||
fgReshape( fgGetInt("/sim/startup/xsize"),
|
fgReshape( fgGetInt("/sim/startup/xsize"),
|
||||||
fgGetInt("/sim/startup/ysize") );
|
fgGetInt("/sim/startup/ysize") );
|
||||||
|
|
||||||
#if 0
|
|
||||||
// swing and a miss
|
|
||||||
|
|
||||||
if ( ! fgPanelVisible() ) {
|
|
||||||
xglViewport( 0, 0 ,
|
|
||||||
(GLint)(fgGetInt("/sim/startup/xsize")),
|
|
||||||
(GLint)(fgGetInt("/sim/startup/ysize")) );
|
|
||||||
} else {
|
|
||||||
int view_h =
|
|
||||||
int( (current_panel->getViewHeight() -
|
|
||||||
current_panel->getYOffset())
|
|
||||||
* (fgGetInt("/sim/startup/ysize") / 768.0) );
|
|
||||||
glViewport( 0,
|
|
||||||
(GLint)(fgGetInt("/sim/startup/ysize") - view_h),
|
|
||||||
(GLint)(fgGetInt("/sim/startup/xsize")),
|
|
||||||
(GLint)(view_h) );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// set the sun position
|
// set the sun position
|
||||||
glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
|
glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
|
||||||
|
|
||||||
|
|
|
@ -797,6 +797,8 @@ parse_option (const string& arg)
|
||||||
fgSetString("/sim/hud/frame-stat-type", "tris");
|
fgSetString("/sim/hud/frame-stat-type", "tris");
|
||||||
} else if ( arg == "--hud-culled" ) {
|
} else if ( arg == "--hud-culled" ) {
|
||||||
fgSetString("/sim/hud/frame-stat-type", "culled");
|
fgSetString("/sim/hud/frame-stat-type", "culled");
|
||||||
|
} else if ( arg.find( "--atc610x" ) == 0 ) {
|
||||||
|
add_channel( "atc610x", "dummy" );
|
||||||
} else if ( arg.find( "--atlas=" ) == 0 ) {
|
} else if ( arg.find( "--atlas=" ) == 0 ) {
|
||||||
add_channel( "atlas", arg.substr(8) );
|
add_channel( "atlas", arg.substr(8) );
|
||||||
} else if ( arg.find( "--httpd=" ) == 0 ) {
|
} else if ( arg.find( "--httpd=" ) == 0 ) {
|
||||||
|
|
|
@ -50,12 +50,6 @@ FGViewer::FGViewer( void ):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update the view parameters
|
|
||||||
void FGViewer::update() {
|
|
||||||
SG_LOG( SG_VIEW, SG_ALERT, "Shouldn't ever see this" );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
FGViewer::~FGViewer( void ) {
|
FGViewer::~FGViewer( void ) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ endif
|
||||||
|
|
||||||
libNetwork_a_SOURCES = \
|
libNetwork_a_SOURCES = \
|
||||||
protocol.cxx protocol.hxx \
|
protocol.cxx protocol.hxx \
|
||||||
|
atc610x.cxx atc610x.hxx \
|
||||||
atlas.cxx atlas.hxx \
|
atlas.cxx atlas.hxx \
|
||||||
garmin.cxx garmin.hxx \
|
garmin.cxx garmin.hxx \
|
||||||
httpd.cxx httpd.hxx \
|
httpd.cxx httpd.hxx \
|
||||||
|
|
1004
src/Network/atc610x.cxx
Normal file
1004
src/Network/atc610x.cxx
Normal file
File diff suppressed because it is too large
Load diff
101
src/Network/atc610x.hxx
Normal file
101
src/Network/atc610x.hxx
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
// atc610x.hxx -- FGFS interface to ATC 610x hardware
|
||||||
|
//
|
||||||
|
// Written by Curtis Olson, started January 2002.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
//
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _FG_ATC610X_HXX
|
||||||
|
#define _FG_ATC610X_HXX
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <plib/netChat.h>
|
||||||
|
|
||||||
|
#include <Main/fg_props.hxx>
|
||||||
|
|
||||||
|
#include "protocol.hxx"
|
||||||
|
|
||||||
|
|
||||||
|
#define ATC_ANAL_IN_VALUES 32
|
||||||
|
#define ATC_ANAL_IN_BYTES (2 * ATC_ANAL_IN_VALUES)
|
||||||
|
#define ATC_COMPASS_CH 5
|
||||||
|
#define ATC_STEPPER_HOME 0xC0
|
||||||
|
#define ATC_RADIO_DISPLAY_BYTES 48
|
||||||
|
#define ATC_RADIO_SWITCH_BYTES 32
|
||||||
|
#define ATC_SWITCH_BYTES 16
|
||||||
|
#define ATC_NUM_COLS 8
|
||||||
|
|
||||||
|
|
||||||
|
class FGATC610x : public FGProtocol {
|
||||||
|
|
||||||
|
int board;
|
||||||
|
|
||||||
|
int lock_fd;
|
||||||
|
int analog_in_fd;
|
||||||
|
int radios_fd;
|
||||||
|
int stepper_fd;
|
||||||
|
int switches_fd;
|
||||||
|
|
||||||
|
char lock_file[256];
|
||||||
|
char analog_in_file[256];
|
||||||
|
char radios_file[256];
|
||||||
|
char stepper_file[256];
|
||||||
|
char switches_file[256];
|
||||||
|
|
||||||
|
unsigned char analog_in_bytes[ATC_ANAL_IN_BYTES];
|
||||||
|
int analog_in_data[ATC_ANAL_IN_VALUES];
|
||||||
|
unsigned char radio_display_data[ATC_RADIO_DISPLAY_BYTES];
|
||||||
|
unsigned char radio_switch_data[ATC_RADIO_SWITCH_BYTES];
|
||||||
|
unsigned char switch_data[ATC_SWITCH_BYTES];
|
||||||
|
|
||||||
|
float compass_position;
|
||||||
|
SGPropertyNode *mag_compass;
|
||||||
|
SGPropertyNode *dme_min, *dme_kt, *dme_nm;
|
||||||
|
SGPropertyNode *com1_freq, *com1_stby_freq;
|
||||||
|
SGPropertyNode *com2_freq, *com2_stby_freq;
|
||||||
|
SGPropertyNode *nav1_freq, *nav1_stby_freq;
|
||||||
|
SGPropertyNode *nav2_freq, *nav2_stby_freq;
|
||||||
|
SGPropertyNode *adf_freq, *adf_stby_freq;
|
||||||
|
|
||||||
|
int dme_switch;
|
||||||
|
|
||||||
|
bool do_analog_in();
|
||||||
|
bool do_radio_switches();
|
||||||
|
bool do_radio_display();
|
||||||
|
bool do_steppers();
|
||||||
|
bool do_switches();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
inline FGATC610x() { }
|
||||||
|
|
||||||
|
inline ~FGATC610x() { }
|
||||||
|
|
||||||
|
bool open();
|
||||||
|
|
||||||
|
bool process();
|
||||||
|
|
||||||
|
bool close();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // _FG_ATC610X_HXX
|
|
@ -1,4 +1,4 @@
|
||||||
// httpd.hxx -- FGFS http property manager interface / external script
|
// httpd.cxx -- FGFS http property manager interface / external script
|
||||||
// and control class
|
// and control class
|
||||||
//
|
//
|
||||||
// Written by Curtis Olson, started June 2001.
|
// Written by Curtis Olson, started June 2001.
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
# error This library requires C++
|
# error This library requires C++
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int FG_NET_FDM_VERSION = 0x0104;
|
const int FG_NET_FDM_VERSION = 0x0004;
|
||||||
|
|
||||||
// Define a structure containing the top level flight dynamics model
|
// Define a structure containing the top level flight dynamics model
|
||||||
// parameters
|
// parameters
|
||||||
|
|
|
@ -125,7 +125,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// is audio working?
|
// is audio working?
|
||||||
inline bool is_working() const { return !audio_sched->not_working(); }
|
inline bool is_working() const { return !audio_sched->notWorking(); }
|
||||||
|
|
||||||
// add a sound effect, return true if successful
|
// add a sound effect, return true if successful
|
||||||
bool add( FGSimpleSound *sound, const string& refname );
|
bool add( FGSimpleSound *sound, const string& refname );
|
||||||
|
|
|
@ -7,10 +7,6 @@ libTime_a_SOURCES = \
|
||||||
moonpos.cxx moonpos.hxx \
|
moonpos.cxx moonpos.hxx \
|
||||||
sunpos.cxx sunpos.hxx \
|
sunpos.cxx sunpos.hxx \
|
||||||
tmp.cxx tmp.hxx
|
tmp.cxx tmp.hxx
|
||||||
# fg_time.cxx fg_time.hxx \
|
|
||||||
# geocoord.cxx geocoord.h \
|
|
||||||
# lowleveltime.cxx lowleveltime.h \
|
|
||||||
# timezone.cxx timezone.h
|
|
||||||
|
|
||||||
if OLD_AUTOMAKE
|
if OLD_AUTOMAKE
|
||||||
INCLUDES += -I$(top_srcdir) -I$(top_srcdir)/src
|
INCLUDES += -I$(top_srcdir) -I$(top_srcdir)/src
|
||||||
|
|
Loading…
Reference in a new issue