Minor fixes in cmake and source files

This commit is contained in:
Roland Winklmeier
2013-03-11 18:51:45 +01:00
parent a11c91dd1b
commit a0a7049785
8 changed files with 21 additions and 10 deletions

View File

@@ -41,12 +41,13 @@ OPTION(WITH_BLACK_XPLANE "Build BlackBox as a X-Plane Plugin"
OPTION(WITH_SIMULATOR_DRIVER "Build Simulator Drivers." ON) OPTION(WITH_SIMULATOR_DRIVER "Build Simulator Drivers." ON)
IF(WITH_SIMULATOR_DRIVER) IF(WITH_SIMULATOR_DRIVER)
OPTION(WITH_STATIC_DRIVERS "Build static simulator drivers" OFF )
############### Drivers ############### ############### Drivers ###############
IF(WIN32) IF(WIN32)
OPTION(WITH_DRIVER_FSX "Build FSX Simulator Driver" ON ) OPTION(WITH_DRIVER_FSX "Build FSX Simulator Driver" OFF )
OPTION(WITH_DRIVER_FS9 "Build FS2004 Simulator Driver" OFF ) OPTION(WITH_DRIVER_FS9 "Build FS2004 Simulator Driver" OFF )
ENDIF(WIN32) ENDIF(WIN32)
OPTION(WITH_DRIVER_XPLANE "Build X-Plane Simulator Driver" ON ) OPTION(WITH_DRIVER_XPLANE "Build X-Plane Simulator Driver" OFF )
ENDIF(WITH_SIMULATOR_DRIVER) ENDIF(WITH_SIMULATOR_DRIVER)
# By default, force release configuration # By default, force release configuration
@@ -119,12 +120,12 @@ endIF()
#### SimConnect #### #### SimConnect ####
IF(WITH_DRIVER_FSX) IF(WITH_DRIVER_FSX)
find_package(SimConnect REQUIRED) find_package(SimConnect REQUIRED)
ENDIF() ENDIF(WITH_DRIVER_FSX)
#### DirectPlay #### #### DirectPlay ####
IF(WITH_DRIVER_FS9) IF(WITH_DRIVER_FS9)
find_package(DirectPlay REQUIRED) find_package(DirectPlay REQUIRED)
ENDIF() ENDIF(WITH_DRIVER_FS9)
############### Compilers flags ############### ############### Compilers flags ###############

View File

@@ -30,6 +30,9 @@ void CQtDisplayer::setParam (QPlainTextEdit *debugWindow)
void CQtDisplayer::doPrint ( const BlackMisc::CLog::SLogInformation &logInformation, const QString &message) void CQtDisplayer::doPrint ( const BlackMisc::CLog::SLogInformation &logInformation, const QString &message)
{ {
if (!m_DebugWindow)
return;
bool needSpace = false; bool needSpace = false;
QString line; QString line;

View File

@@ -117,6 +117,7 @@ namespace FSD
FSD_MSG_Plane_Position() : FSD_MSG(QString("@")) FSD_MSG_Plane_Position() : FSD_MSG(QString("@"))
{ {
m_message_tokens.resize(10);
} }
inline QString SquawkMode() const { return m_message_tokens.at(0); } inline QString SquawkMode() const { return m_message_tokens.at(0); }
@@ -125,7 +126,7 @@ namespace FSD
inline quint16 Rating() const { return m_message_tokens.at(3).toUInt(); } inline quint16 Rating() const { return m_message_tokens.at(3).toUInt(); }
inline double Latitude() const { return m_message_tokens.at(4).toDouble(); } inline double Latitude() const { return m_message_tokens.at(4).toDouble(); }
inline double Longitude() const { return m_message_tokens.at(5).toDouble(); } inline double Longitude() const { return m_message_tokens.at(5).toDouble(); }
inline qint32 Altitude() const { return m_message_tokens.at(6).toInt(); } inline double Altitude() const { return m_message_tokens.at(6).toDouble(); }
inline qint32 Speed() const { return m_message_tokens.at(7).toInt(); } inline qint32 Speed() const { return m_message_tokens.at(7).toInt(); }
inline quint32 PBH() const { return m_message_tokens.at(8).toUInt(); } inline quint32 PBH() const { return m_message_tokens.at(8).toUInt(); }
inline qint32 AltDiff() const { return m_message_tokens.at(9).toInt(); } inline qint32 AltDiff() const { return m_message_tokens.at(9).toInt(); }
@@ -136,7 +137,7 @@ namespace FSD
inline void setRating ( const quint16 rating) { m_message_tokens.replace(3, QString("%1").arg(rating)); } inline void setRating ( const quint16 rating) { m_message_tokens.replace(3, QString("%1").arg(rating)); }
inline void setLatitude ( const double latitude) { m_message_tokens.replace(4, QString("%1").arg(latitude)); } inline void setLatitude ( const double latitude) { m_message_tokens.replace(4, QString("%1").arg(latitude)); }
inline void setLongitude ( const double longitude) { m_message_tokens.replace(5, QString("%1").arg(longitude)); } inline void setLongitude ( const double longitude) { m_message_tokens.replace(5, QString("%1").arg(longitude)); }
inline void setAltitude ( const qint32 altitude) { m_message_tokens.replace(6, QString("%1").arg(altitude)); } inline void setAltitude ( const double altitude) { m_message_tokens.replace(6, QString("%1").arg(altitude)); }
inline void setSpeed ( const qint32 speed) { m_message_tokens.replace(7, QString("%1").arg(speed)); } inline void setSpeed ( const qint32 speed) { m_message_tokens.replace(7, QString("%1").arg(speed)); }
inline void setPBH ( const quint32 pbh) { m_message_tokens.replace(8, QString("%1").arg(pbh)); } inline void setPBH ( const quint32 pbh) { m_message_tokens.replace(8, QString("%1").arg(pbh)); }
inline void setAltDiff ( const qint32 altdiff) { m_message_tokens.replace(9, QString("%1").arg(altdiff)); } inline void setAltDiff ( const qint32 altdiff) { m_message_tokens.replace(9, QString("%1").arg(altdiff)); }

View File

@@ -45,6 +45,7 @@ class CInterpolator
{ {
public: public:
CInterpolator(); CInterpolator();
virtual ~CInterpolator();
void initialize(); void initialize();

View File

@@ -6,7 +6,7 @@
#ifndef TYPE_INFO_H #ifndef TYPE_INFO_H
#define TYPE_INFO_H #define TYPE_INFO_H
#include <typeinfo.h> #include <typeinfo>
namespace BlackMisc namespace BlackMisc
{ {

View File

@@ -83,7 +83,6 @@ namespace FSD
QTextStream& FSD_MSG_Plane_Position::operator<< ( QTextStream& in) QTextStream& FSD_MSG_Plane_Position::operator<< ( QTextStream& in)
{ {
QString message = in.readAll(); QString message = in.readAll();
m_message_tokens.resize(10);
qint32 size = unpack(message, m_message_tokens); qint32 size = unpack(message, m_message_tokens);
bAssert ( size == 10 ); bAssert ( size == 10 );

View File

@@ -14,6 +14,12 @@ CInterpolator::CInterpolator()
m_time.start(); m_time.start();
} }
CInterpolator::~CInterpolator()
{
delete m_state_begin;
delete m_state_end;
}
void CInterpolator::initialize() void CInterpolator::initialize()
{ {

View File

@@ -18,7 +18,7 @@ FIND_PATH(SIMCONNECT_INCLUDE_DIR
"$ENV{ProgramFiles(x86)}/Microsoft Games/Microsoft Flight Simulator X SDK/SDK/Core Utilities Kit/SimConnect SDK" "$ENV{ProgramFiles(x86)}/Microsoft Games/Microsoft Flight Simulator X SDK/SDK/Core Utilities Kit/SimConnect SDK"
PATH_SUFFIXES inc) PATH_SUFFIXES inc)
FIND_PATH(SIMCONNECT_LIBRARY FIND_PATH(SIMCONNECT_LIBRARY_DIR
NAMES SimConnect.lib NAMES SimConnect.lib
PATHS PATHS
"$ENV{ProgramFiles(x86)}/Microsoft Games/Microsoft Flight Simulator X SDK/SDK/Core Utilities Kit/SimConnect SDK" "$ENV{ProgramFiles(x86)}/Microsoft Games/Microsoft Flight Simulator X SDK/SDK/Core Utilities Kit/SimConnect SDK"
@@ -27,4 +27,4 @@ FIND_PATH(SIMCONNECT_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set SIMCONNECT_FOUND to TRUE # handle the QUIETLY and REQUIRED arguments and set SIMCONNECT_FOUND to TRUE
# if all listed variables are TRUE # if all listed variables are TRUE
find_package_handle_standard_args(SimConnect DEFAULT_MSG find_package_handle_standard_args(SimConnect DEFAULT_MSG
SIMCONNECT_LIBRARY SIMCONNECT_INCLUDE_DIR) SIMCONNECT_LIBRARY_DIR SIMCONNECT_INCLUDE_DIR)