Use one standard define for enableing of the Special Purpose FDM code.
This commit is contained in:
parent
4914844c31
commit
a4265a3b0a
5 changed files with 19 additions and 19 deletions
|
@ -91,7 +91,7 @@ if test "x$with_logging" = "xno" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(sp_fdms, [ --enable-sp-fdms Include special purpose Flight Models], [enable_sp_fdms="$enableval"] )
|
AC_ARG_ENABLE(sp_fdms, [ --enable-sp-fdms Include special purpose Flight Models], [enable_sp_fdms="$enableval"] )
|
||||||
AC_DEFINE([ENABLE_SP_FMDS], test "x$enable_sp_fdms" = "xyes", [Define to include special purpose FDMs])
|
AC_DEFINE([ENABLE_SP_FDM], test "x$enable_sp_fdms" = "xyes", [Define to include special purpose FDMs])
|
||||||
AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")
|
AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
#include <FDM/SP/ADA.hxx>
|
#include <FDM/SP/ADA.hxx>
|
||||||
#endif
|
#endif
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
|
@ -341,7 +341,7 @@ float get_anzg ( void )
|
||||||
return anzg;
|
return anzg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
int get_iaux1 (void)
|
int get_iaux1 (void)
|
||||||
{
|
{
|
||||||
FGADA *fdm = (FGADA *)current_aircraft.fdm_state;
|
FGADA *fdm = (FGADA *)current_aircraft.fdm_state;
|
||||||
|
@ -603,7 +603,7 @@ struct FuncTable {
|
||||||
{ "view_direction", get_view_direction },
|
{ "view_direction", get_view_direction },
|
||||||
{ "vfc_tris_culled", get_vfc_tris_culled },
|
{ "vfc_tris_culled", get_vfc_tris_culled },
|
||||||
{ "vfc_tris_drawn", get_vfc_tris_drawn },
|
{ "vfc_tris_drawn", get_vfc_tris_drawn },
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
{ "aux1", get_aux1 },
|
{ "aux1", get_aux1 },
|
||||||
{ "aux2", get_aux2 },
|
{ "aux2", get_aux2 },
|
||||||
{ "aux3", get_aux3 },
|
{ "aux3", get_aux3 },
|
||||||
|
|
|
@ -94,7 +94,7 @@ void HudLadder::draw(void)
|
||||||
alpha = get_aoa();
|
alpha = get_aoa();
|
||||||
pla = get_throttleval();
|
pla = get_throttleval();
|
||||||
|
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
int lgear, wown, wowm, ilcanclaw, ihook;
|
int lgear, wown, wowm, ilcanclaw, ihook;
|
||||||
ilcanclaw = get_iaux2();
|
ilcanclaw = get_iaux2();
|
||||||
lgear = get_iaux3();
|
lgear = get_iaux3();
|
||||||
|
@ -247,7 +247,7 @@ void HudLadder::draw(void)
|
||||||
glVertex2f(vel_x, vel_y + 6);
|
glVertex2f(vel_x, vel_y + 6);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
// OBJECT MOVING RETICLE
|
// OBJECT MOVING RETICLE
|
||||||
// TYPE LINE
|
// TYPE LINE
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
|
@ -295,7 +295,7 @@ void HudLadder::draw(void)
|
||||||
// TYPE - SQUARE_BRACKET
|
// TYPE - SQUARE_BRACKET
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
// alpha bracket
|
// alpha bracket
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (alpha_bracket && ihook == 1) {
|
if (alpha_bracket && ihook == 1) {
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * factor);
|
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * factor);
|
||||||
|
@ -365,7 +365,7 @@ void HudLadder::draw(void)
|
||||||
// OBJECT STATIC RETICLE
|
// OBJECT STATIC RETICLE
|
||||||
// TYPE LINE
|
// TYPE LINE
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (energy_worm && ilcanclaw == 1) {
|
if (energy_worm && ilcanclaw == 1) {
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
glVertex2f(-15, -134);
|
glVertex2f(-15, -134);
|
||||||
|
@ -562,7 +562,7 @@ void HudLadder::draw(void)
|
||||||
// TYPE LINE
|
// TYPE LINE
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
// draw appraoch glide slope marker
|
// draw appraoch glide slope marker
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (glide_slope_marker && ihook) {
|
if (glide_slope_marker && ihook) {
|
||||||
Line(-half_span + 15, (glide_slope-actslope) * factor,
|
Line(-half_span + 15, (glide_slope-actslope) * factor,
|
||||||
-half_span + hole, (glide_slope - actslope) * factor);
|
-half_span + hole, (glide_slope - actslope) * factor);
|
||||||
|
@ -590,7 +590,7 @@ void HudLadder::draw(void)
|
||||||
//*************************************************************
|
//*************************************************************
|
||||||
|
|
||||||
//*************************************************************
|
//*************************************************************
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (waypoint_marker) {
|
if (waypoint_marker) {
|
||||||
//waypoint marker computation
|
//waypoint marker computation
|
||||||
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;
|
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;
|
||||||
|
|
|
@ -37,7 +37,7 @@ float get__Vz() { return fgGetFloat("/velocities/wBody-fps"); }
|
||||||
float get__Ax() { return fgGetFloat("/acclerations/pilot/x-accel-fps_sec"); }
|
float get__Ax() { return fgGetFloat("/acclerations/pilot/x-accel-fps_sec"); }
|
||||||
float get__Ay() { return fgGetFloat("/acclerations/pilot/y-accel-fps_sec"); }
|
float get__Ay() { return fgGetFloat("/acclerations/pilot/y-accel-fps_sec"); }
|
||||||
float get__Az() { return fgGetFloat("/acclerations/pilot/z-accel-fps_sec"); }
|
float get__Az() { return fgGetFloat("/acclerations/pilot/z-accel-fps_sec"); }
|
||||||
#undef ENABLE_SP_FMDS
|
#undef ENABLE_SP_FDM
|
||||||
|
|
||||||
|
|
||||||
HUD::Ladder::Ladder(HUD *hud, const SGPropertyNode *n, float x, float y) :
|
HUD::Ladder::Ladder(HUD *hud, const SGPropertyNode *n, float x, float y) :
|
||||||
|
@ -103,7 +103,7 @@ void HUD::Ladder::draw(void)
|
||||||
alpha = get__aoa();
|
alpha = get__aoa();
|
||||||
pla = get__throttleval();
|
pla = get__throttleval();
|
||||||
|
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
int lgear, wown, wowm, ilcanclaw, ihook;
|
int lgear, wown, wowm, ilcanclaw, ihook;
|
||||||
ilcanclaw = get__iaux2();
|
ilcanclaw = get__iaux2();
|
||||||
lgear = get__iaux3();
|
lgear = get__iaux3();
|
||||||
|
@ -256,7 +256,7 @@ void HUD::Ladder::draw(void)
|
||||||
glVertex2f(vel_x, vel_y + 6);
|
glVertex2f(vel_x, vel_y + 6);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
// OBJECT MOVING RETICLE
|
// OBJECT MOVING RETICLE
|
||||||
// TYPE LINE
|
// TYPE LINE
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
|
@ -304,7 +304,7 @@ void HUD::Ladder::draw(void)
|
||||||
// TYPE - SQUARE_BRACKET
|
// TYPE - SQUARE_BRACKET
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
// alpha bracket
|
// alpha bracket
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (_alpha_bracket && ihook == 1) {
|
if (_alpha_bracket && ihook == 1) {
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * _compression);
|
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * _compression);
|
||||||
|
@ -374,7 +374,7 @@ void HUD::Ladder::draw(void)
|
||||||
// OBJECT STATIC RETICLE
|
// OBJECT STATIC RETICLE
|
||||||
// TYPE LINE
|
// TYPE LINE
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (_energy_worm && ilcanclaw == 1) {
|
if (_energy_worm && ilcanclaw == 1) {
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
glVertex2f(-15, -134);
|
glVertex2f(-15, -134);
|
||||||
|
@ -568,7 +568,7 @@ void HUD::Ladder::draw(void)
|
||||||
// TYPE LINE
|
// TYPE LINE
|
||||||
// ATTRIB - ON CONDITION
|
// ATTRIB - ON CONDITION
|
||||||
// draw appraoch glide slope marker
|
// draw appraoch glide slope marker
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (_glide_slope_marker && ihook) {
|
if (_glide_slope_marker && ihook) {
|
||||||
draw_line(-half_span + 15, (_glide_slope - actslope) * _compression,
|
draw_line(-half_span + 15, (_glide_slope - actslope) * _compression,
|
||||||
-half_span + hole, (_glide_slope - actslope) * _compression);
|
-half_span + hole, (_glide_slope - actslope) * _compression);
|
||||||
|
@ -596,7 +596,7 @@ void HUD::Ladder::draw(void)
|
||||||
//*************************************************************
|
//*************************************************************
|
||||||
|
|
||||||
//*************************************************************
|
//*************************************************************
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
if (_waypoint_marker) {
|
if (_waypoint_marker) {
|
||||||
//waypoint marker computation
|
//waypoint marker computation
|
||||||
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;
|
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
#include <Cockpit/cockpit.hxx>
|
#include <Cockpit/cockpit.hxx>
|
||||||
#include <Cockpit/panel.hxx>
|
#include <Cockpit/panel.hxx>
|
||||||
#include <Cockpit/panel_io.hxx>
|
#include <Cockpit/panel_io.hxx>
|
||||||
#ifdef ENABLE_SP_FMDS
|
#ifdef ENABLE_SP_FDM
|
||||||
#include <FDM/SP/ADA.hxx>
|
#include <FDM/SP/ADA.hxx>
|
||||||
#include <FDM/SP/ACMS.hxx>
|
#include <FDM/SP/ACMS.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1266,7 +1266,7 @@ void fgInitFDM() {
|
||||||
cur_fdm_state = new FGLaRCsim( dt );
|
cur_fdm_state = new FGLaRCsim( dt );
|
||||||
} else if ( model == "jsb" ) {
|
} else if ( model == "jsb" ) {
|
||||||
cur_fdm_state = new FGJSBsim( dt );
|
cur_fdm_state = new FGJSBsim( dt );
|
||||||
#if ENABLE_SP_FDMS
|
#if ENABLE_SP_FDM
|
||||||
} else if ( model == "ada" ) {
|
} else if ( model == "ada" ) {
|
||||||
cur_fdm_state = new FGADA( dt );
|
cur_fdm_state = new FGADA( dt );
|
||||||
} else if ( model == "acms" ) {
|
} else if ( model == "acms" ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue