1
0
Fork 0

warning fixes

This commit is contained in:
torsten 2009-08-21 21:46:58 +00:00 committed by Tim Moore
parent 6ba395969c
commit cd89ce7d0a
5 changed files with 20 additions and 18 deletions

View file

@ -173,6 +173,7 @@ static int ATCSetStepper( int fd, unsigned char channel,
} }
#ifdef ATCFLIGHTSIM_HAVE_COMPASS
// Read status of last stepper written to // Read status of last stepper written to
static unsigned char ATCReadStepper( int fd ) { static unsigned char ATCReadStepper( int fd ) {
#if defined( unix ) || defined( __CYGWIN__ ) #if defined( unix ) || defined( __CYGWIN__ )
@ -195,6 +196,7 @@ static unsigned char ATCReadStepper( int fd ) {
return 0; return 0;
#endif #endif
} }
#endif
// Turn a lamp on or off // Turn a lamp on or off

View file

@ -43,6 +43,7 @@ FGAV400::~FGAV400() {
} }
#if 0
// calculate the garmin check sum // calculate the garmin check sum
static char calc_nmea_cksum(char *sentence) { static char calc_nmea_cksum(char *sentence) {
unsigned char sum = 0; unsigned char sum = 0;
@ -61,6 +62,7 @@ static char calc_nmea_cksum(char *sentence) {
// printf("sum = %02x\n", sum); // printf("sum = %02x\n", sum);
return sum; return sum;
} }
#endif
// generate AV400 message // generate AV400 message

View file

@ -267,7 +267,7 @@ void HttpdChannel::foundTerminator (void) {
SG_LOG( SG_IO, SG_INFO, "size = " << response.length() ); SG_LOG( SG_IO, SG_INFO, "size = " << response.length() );
char ctmp[256]; char ctmp[256];
sprintf(ctmp, "Content-Length: %d", response.length()); sprintf(ctmp, "Content-Length: %u", (unsigned)response.length());
push( ctmp ); push( ctmp );
push( getTerminator() ); push( getTerminator() );

View file

@ -50,6 +50,18 @@ FGOpenGC::FGOpenGC() :
wind_dir_node(fgGetNode("/environment/wind-from-heading-deg[0]", true)), wind_dir_node(fgGetNode("/environment/wind-from-heading-deg[0]", true)),
wind_speed_node(fgGetNode("/environment/wind-speed-kt[0]", true)), wind_speed_node(fgGetNode("/environment/wind-speed-kt[0]", true)),
magvar_node(fgGetNode("/environment/magnetic-variation-deg[0]", true)), magvar_node(fgGetNode("/environment/magnetic-variation-deg[0]", true)),
p_latitude(fgGetNode("/position/latitude-deg", true)),
p_longitude(fgGetNode("/position/longitude-deg", true)),
p_elev_node(fgGetNode("/position/altitude-ft", true)),
p_altitude_agl(fgGetNode("/position/altitude-agl-ft", true)),
p_pitch(fgGetNode("/orientation/pitch-deg[0]", true)),
p_bank(fgGetNode("/orientation/roll-deg[0]", true)),
p_heading(fgGetNode("/orientation/heading-magnetic-deg[0]", true)),
p_yaw(fgGetNode("/fdm/jsbsim/aero/beta-rad[0]", true)),
p_yaw_rate(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true)),
vel_kcas(fgGetNode("/velocities/airspeed-kt[0]", true)),
p_vvi(fgGetNode("/velocities/vertical-speed-fps[0]", true )),
p_mach(fgGetNode("/velocities/mach[0]", true )),
p_left_aileron(fgGetNode("surface-positions/left-aileron-pos-norm", true)), p_left_aileron(fgGetNode("surface-positions/left-aileron-pos-norm", true)),
p_right_aileron(fgGetNode("surface-positions/right-aileron-pos-norm", true)), p_right_aileron(fgGetNode("surface-positions/right-aileron-pos-norm", true)),
p_elevator(fgGetNode("surface-positions/elevator-pos-norm", true)), p_elevator(fgGetNode("surface-positions/elevator-pos-norm", true)),
@ -57,15 +69,7 @@ FGOpenGC::FGOpenGC() :
p_rudder(fgGetNode("surface-positions/rudder-pos-norm", true)), p_rudder(fgGetNode("surface-positions/rudder-pos-norm", true)),
p_flaps(fgGetNode("surface-positions/flap-pos-norm", true)), p_flaps(fgGetNode("surface-positions/flap-pos-norm", true)),
p_flaps_cmd(fgGetNode("/controls/flight/flaps", true)), p_flaps_cmd(fgGetNode("/controls/flight/flaps", true)),
p_alphadot(fgGetNode("/fdm/jsbsim/aero/alphadot-rad_sec[0]", true)), p_park_brake(fgGetNode("/controls/gear/brake-parking", true)),
p_betadot(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true)),
p_latitude(fgGetNode("/position/latitude-deg", true)),
p_longitude(fgGetNode("/position/longitude-deg", true)),
p_elev_node(fgGetNode("/position/altitude-ft", true)),
p_altitude_agl(fgGetNode("/position/altitude-agl-ft", true)),
vel_kcas(fgGetNode("/velocities/airspeed-kt[0]", true)),
p_vvi(fgGetNode("/velocities/vertical-speed-fps[0]", true )),
p_mach(fgGetNode("/velocities/mach[0]", true )),
egt0_node(fgGetNode("/engines/engine/EGT_degC[0]", true)), egt0_node(fgGetNode("/engines/engine/EGT_degC[0]", true)),
egt1_node(fgGetNode("/engines/engine[1]/EGT_degC[0]", true)), egt1_node(fgGetNode("/engines/engine[1]/EGT_degC[0]", true)),
egt2_node(fgGetNode("/engines/engine[2]/EGT_degC[0]", true)), egt2_node(fgGetNode("/engines/engine[2]/EGT_degC[0]", true)),
@ -94,13 +98,8 @@ FGOpenGC::FGOpenGC() :
tank5_node(fgGetNode("/consumables/fuel/tank[5]/level-lb[0]", true)), tank5_node(fgGetNode("/consumables/fuel/tank[5]/level-lb[0]", true)),
tank6_node(fgGetNode("/consumables/fuel/tank[6]/level-lb[0]", true)), tank6_node(fgGetNode("/consumables/fuel/tank[6]/level-lb[0]", true)),
tank7_node(fgGetNode("/consumables/fuel/tank[7]/level-lb[0]", true)), tank7_node(fgGetNode("/consumables/fuel/tank[7]/level-lb[0]", true)),
p_park_brake(fgGetNode("/controls/gear/brake-parking", true)), p_alphadot(fgGetNode("/fdm/jsbsim/aero/alphadot-rad_sec[0]", true)),
p_pitch(fgGetNode("/orientation/pitch-deg[0]", true)), p_betadot(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true))
p_bank(fgGetNode("/orientation/roll-deg[0]", true)),
p_heading(fgGetNode("/orientation/heading-magnetic-deg[0]", true)),
p_yaw(fgGetNode("/fdm/jsbsim/aero/beta-rad[0]", true)),
p_yaw_rate(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true))
{ {
} }

View file

@ -39,7 +39,6 @@
class FGOpenGC : public FGProtocol, public FGInterface { class FGOpenGC : public FGProtocol, public FGInterface {
ogcFGData buf; ogcFGData buf;
int length;
// Environment // Environment
SGPropertyNode_ptr press_node; SGPropertyNode_ptr press_node;