mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
GCS: Cleanup to allow -pedantic compile flag and changes to reduce the noise that it generates.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1243 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
431581b73b
commit
4536782428
@ -63,7 +63,7 @@
|
||||
|
||||
using namespace ExtensionSystem;
|
||||
|
||||
Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*);
|
||||
Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*)
|
||||
|
||||
/*!
|
||||
\fn PluginView::PluginView(PluginManager *manager, QWidget *parent)
|
||||
|
@ -250,7 +250,7 @@ PQP_Model::MemUsage(int msg)
|
||||
|
||||
if (msg)
|
||||
{
|
||||
fprintf(stderr,"Total for model %p: %d bytes\n", this, total_mem);
|
||||
fprintf(stderr,"Total for model %p: %d bytes\n", (void*)this, total_mem);
|
||||
fprintf(stderr,"BVs: %d alloced, take %d bytes each\n",
|
||||
num_bvs, sizeof(BV));
|
||||
fprintf(stderr,"Tris: %d alloced, take %d bytes each\n",
|
||||
|
@ -80,6 +80,6 @@ namespace glc
|
||||
|
||||
//@}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*GLC_GEOMTOOLS_H_*/
|
||||
|
@ -49,7 +49,7 @@ namespace glc
|
||||
extern QMutex iDMutex;
|
||||
extern QMutex geomIdMutex;
|
||||
extern QMutex userIdMutex;
|
||||
};
|
||||
}
|
||||
|
||||
// GLC_Lib version
|
||||
|
||||
|
@ -83,5 +83,5 @@ namespace glc
|
||||
|
||||
//! Load Point Sprite extension
|
||||
bool loadPointSpriteExtension();
|
||||
};
|
||||
}
|
||||
#endif /*GLC_EXT_H_*/
|
||||
|
@ -49,7 +49,7 @@ namespace glc
|
||||
extern QMutex iDMutex;
|
||||
extern QMutex geomIdMutex;
|
||||
extern QMutex userIdMutex;
|
||||
};
|
||||
}
|
||||
|
||||
// GLC_Lib version
|
||||
|
||||
|
@ -83,5 +83,5 @@ namespace glc
|
||||
|
||||
//! Load Point Sprite extension
|
||||
bool loadPointSpriteExtension();
|
||||
};
|
||||
}
|
||||
#endif /*GLC_EXT_H_*/
|
||||
|
@ -39,6 +39,6 @@ namespace glc
|
||||
/*! \def PI
|
||||
* \brief Define the magic number PI */
|
||||
const double PI= acos(-1.0);
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*GLC_UTILS_MATHS_H_*/
|
||||
|
@ -397,7 +397,7 @@ namespace glc
|
||||
/*! \var Z_AXIS
|
||||
* \brief Z axis Vector*/
|
||||
const GLC_Vector4d Z_AXIS(0.0, 0.0, 1.0);
|
||||
};
|
||||
}
|
||||
|
||||
//! Define GLC_Point4D
|
||||
typedef GLC_Vector4d GLC_Point4d;
|
||||
|
@ -70,7 +70,7 @@ typedef enum {
|
||||
/* Bit 11-12: Unused ? */
|
||||
LIB3DS_FACE_FLAG_SELECT_3 = (1<<13), /*!< Bit 13: Selection of the face in selection 3*/
|
||||
LIB3DS_FACE_FLAG_SELECT_2 = (1<<14), /*!< Bit 14: Selection of the face in selection 2*/
|
||||
LIB3DS_FACE_FLAG_SELECT_1 = (1<<15), /*!< Bit 15: Selection of the face in selection 1*/
|
||||
LIB3DS_FACE_FLAG_SELECT_1 = (1<<15) /*!< Bit 15: Selection of the face in selection 1*/
|
||||
} Lib3dsFaceFlag;
|
||||
|
||||
/**
|
||||
|
@ -39,6 +39,6 @@ namespace glc
|
||||
/*! \def PI
|
||||
* \brief Define the magic number PI */
|
||||
const double PI= acos(-1.0);
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*GLC_UTILS_MATHS_H_*/
|
||||
|
@ -397,7 +397,7 @@ namespace glc
|
||||
/*! \var Z_AXIS
|
||||
* \brief Z axis Vector*/
|
||||
const GLC_Vector4d Z_AXIS(0.0, 0.0, 1.0);
|
||||
};
|
||||
}
|
||||
|
||||
//! Define GLC_Point4D
|
||||
typedef GLC_Vector4d GLC_Point4d;
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include <QMultiHash>
|
||||
#include <QFlags>
|
||||
class QxtCommandOptionsPrivate;
|
||||
QT_FORWARD_DECLARE_CLASS(QTextStream);
|
||||
QT_FORWARD_DECLARE_CLASS(QIODevice);
|
||||
QT_FORWARD_DECLARE_CLASS(QTextStream)
|
||||
QT_FORWARD_DECLARE_CLASS(QIODevice)
|
||||
|
||||
|
||||
class QXT_CORE_EXPORT QxtCommandOptions
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
Stop2 = 128,
|
||||
StopMask = 128
|
||||
};
|
||||
Q_DECLARE_FLAGS(PortSettings, PortSetting);
|
||||
Q_DECLARE_FLAGS(PortSettings, PortSetting)
|
||||
|
||||
explicit QxtSerialDevice(const QString& device, QObject* parent = 0);
|
||||
QxtSerialDevice(QObject* parent = 0);
|
||||
@ -91,6 +91,6 @@ private:
|
||||
QXT_DECLARE_PRIVATE(QxtSerialDevice)
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QxtSerialDevice::PortSettings);
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QxtSerialDevice::PortSettings)
|
||||
|
||||
#endif
|
||||
|
@ -53,7 +53,7 @@ namespace core {
|
||||
/// <summary>
|
||||
/// access only cache
|
||||
/// </summary>
|
||||
CacheOnly,
|
||||
CacheOnly
|
||||
};
|
||||
static QString StrByType(Types const& value)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ namespace core {
|
||||
/// The given key has gone over the requests limit in the 24 hour period or has submitted too many requests in too short a period of time.
|
||||
/// If you're sending multiple requests in parallel or in a tight loop, use a timer or pause in your code to make sure you don't send the requests too quickly.
|
||||
/// </summary>
|
||||
G_GEO_TOO_MANY_QUERIES=620,
|
||||
G_GEO_TOO_MANY_QUERIES=620
|
||||
|
||||
};
|
||||
static QString StrByType(Types const& value)
|
||||
|
@ -94,7 +94,7 @@ namespace core {
|
||||
Ukrainian,
|
||||
Vietnamese,
|
||||
ChineseSimplified,
|
||||
ChineseTraditional,
|
||||
ChineseTraditional
|
||||
};
|
||||
|
||||
static QString StrByType(Types const& value)
|
||||
|
@ -96,7 +96,7 @@ namespace core {
|
||||
GoogleLabelsKorea=4003,
|
||||
GoogleHybridKorea=4005,
|
||||
|
||||
YandexMapRu = 5000,
|
||||
YandexMapRu = 5000
|
||||
};
|
||||
static QString StrByType(Types const& value)
|
||||
{
|
||||
|
@ -28,6 +28,9 @@
|
||||
|
||||
|
||||
namespace core {
|
||||
|
||||
const double UrlFactory::EarthRadiusKm = 6378.137; // WGS-84
|
||||
|
||||
UrlFactory::UrlFactory()
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -69,7 +69,7 @@ namespace core {
|
||||
bool CorrectGoogleVersions;
|
||||
bool UseGeocoderCache; //TODO GetSet
|
||||
bool UsePlacemarkCache;//TODO GetSet
|
||||
static const double EarthRadiusKm = 6378.137; // WGS-84
|
||||
static const double EarthRadiusKm;
|
||||
double GetDistance(internals::PointLatLng p1,internals::PointLatLng p2);
|
||||
|
||||
protected:
|
||||
|
@ -53,7 +53,7 @@ namespace internals {
|
||||
/// <summary>
|
||||
/// zooms map to current view center
|
||||
/// </summary>
|
||||
ViewCenter,
|
||||
ViewCenter
|
||||
};
|
||||
static QString StrByType(Types const& value)
|
||||
{
|
||||
|
@ -32,6 +32,17 @@
|
||||
|
||||
|
||||
namespace internals {
|
||||
|
||||
const double PureProjection::PI = M_PI;
|
||||
const double PureProjection::HALF_PI = (M_PI * 0.5);
|
||||
const double PureProjection::TWO_PI= (M_PI * 2.0);
|
||||
const double PureProjection::EPSLoN= 1.0e-10;
|
||||
const double PureProjection::MAX_VAL= 4;
|
||||
const double PureProjection::MAXLONG= 2147483647;
|
||||
const double PureProjection::DBLLONG= 4.61168601e18;
|
||||
const double PureProjection::R2D=180/M_PI;
|
||||
const double PureProjection::D2R=M_PI/180;
|
||||
|
||||
Point PureProjection::FromLatLngToPixel(const PointLatLng::PointLatLng &p,const int &zoom)
|
||||
{
|
||||
return FromLatLngToPixel(p.Lat(), p.Lng(), zoom);
|
||||
|
@ -83,15 +83,15 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
static const double PI = M_PI;
|
||||
static const double HALF_PI = (M_PI * 0.5);
|
||||
static const double TWO_PI= (M_PI * 2.0);
|
||||
static const double EPSLoN= 1.0e-10;
|
||||
static const double MAX_VAL= 4;
|
||||
static const double MAXLONG= 2147483647;
|
||||
static const double DBLLONG= 4.61168601e18;
|
||||
static const double R2D=180/M_PI;
|
||||
static const double D2R=M_PI/180;
|
||||
static const double PI;
|
||||
static const double HALF_PI;
|
||||
static const double TWO_PI;
|
||||
static const double EPSLoN;
|
||||
static const double MAX_VAL;
|
||||
static const double MAXLONG;
|
||||
static const double DBLLONG;
|
||||
static const double R2D;
|
||||
static const double D2R;
|
||||
|
||||
static double Sign(const double &x);
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
*/
|
||||
namespace Qwt
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -137,7 +137,7 @@ protected:
|
||||
enum Error
|
||||
{
|
||||
ErrorTimeout = -200, /**< Timed out trying to communicate with other device */
|
||||
ErrorBlockRetriesExceded = -201, /**< A block could not be sent */
|
||||
ErrorBlockRetriesExceded = -201 /**< A block could not be sent */
|
||||
|
||||
};
|
||||
|
||||
|
@ -699,7 +699,8 @@ bool UAVObjectParser::generateFlightObject(int objIndex, const QString& template
|
||||
QStringList options = info->fields[n]->options;
|
||||
for (int m = 0; m < options.length(); ++m)
|
||||
{
|
||||
enums.append( QString("%1_%2_%3=%4, ")
|
||||
QString s = (m == (options.length()-1)) ? "%1_%2_%3=%4" : "%1_%2_%3=%4, ";
|
||||
enums.append( s
|
||||
.arg( info->name.toUpper() )
|
||||
.arg( info->fields[n]->name.toUpper() )
|
||||
.arg( options[m].toUpper() )
|
||||
@ -719,7 +720,8 @@ bool UAVObjectParser::generateFlightObject(int objIndex, const QString& template
|
||||
QStringList elemNames = info->fields[n]->elementNames;
|
||||
for (int m = 0; m < elemNames.length(); ++m)
|
||||
{
|
||||
enums.append( QString("%1_%2_%3=%4, ")
|
||||
QString s = (m != (elemNames.length()-1)) ? "%1_%2_%3=%4, " : "%1_%2_%3=%4";
|
||||
enums.append( s
|
||||
.arg( info->name.toUpper() )
|
||||
.arg( info->fields[n]->name.toUpper() )
|
||||
.arg( elemNames[m].toUpper() )
|
||||
@ -903,7 +905,8 @@ bool UAVObjectParser::generateGCSObject(int objIndex, const QString& templateInc
|
||||
QStringList options = info->fields[n]->options;
|
||||
for (int m = 0; m < options.length(); ++m)
|
||||
{
|
||||
enums.append( QString("%1_%2=%3, ")
|
||||
QString s = (m != (options.length()-1)) ? "%1_%2=%3, " : "%1_%2=%3";
|
||||
enums.append( s
|
||||
.arg( info->fields[n]->name.toUpper() )
|
||||
.arg( options[m].toUpper() )
|
||||
.arg(m) );
|
||||
@ -921,7 +924,8 @@ bool UAVObjectParser::generateGCSObject(int objIndex, const QString& templateInc
|
||||
QStringList elemNames = info->fields[n]->elementNames;
|
||||
for (int m = 0; m < elemNames.length(); ++m)
|
||||
{
|
||||
enums.append( QString("%1_%2=%3, ")
|
||||
QString s = (m != (elemNames.length()-1)) ? "%1_%2=%3, " : "%1_%2=%3";
|
||||
enums.append( s
|
||||
.arg( info->fields[n]->name.toUpper() )
|
||||
.arg( elemNames[m].toUpper() )
|
||||
.arg(m) );
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtDebug>
|
||||
|
||||
Q_DECLARE_METATYPE(Core::Internal::ShortcutItem*);
|
||||
Q_DECLARE_METATYPE(Core::Internal::ShortcutItem*)
|
||||
|
||||
using namespace Core;
|
||||
using namespace Core::Internal;
|
||||
|
@ -100,7 +100,7 @@ namespace Internal {
|
||||
// and read while checking).
|
||||
|
||||
class FileMatchContext {
|
||||
Q_DISABLE_COPY(FileMatchContext);
|
||||
Q_DISABLE_COPY(FileMatchContext)
|
||||
public:
|
||||
// Max data to be read from a file
|
||||
enum { MaxData = 2048 };
|
||||
@ -151,7 +151,7 @@ QByteArray FileMatchContext::data()
|
||||
|
||||
// The binary fallback matcher for "application/octet-stream".
|
||||
class BinaryMatcher : public IMagicMatcher {
|
||||
Q_DISABLE_COPY(BinaryMatcher);
|
||||
Q_DISABLE_COPY(BinaryMatcher)
|
||||
public:
|
||||
BinaryMatcher() {}
|
||||
virtual bool matches(const QByteArray & /*data*/) const { return true; }
|
||||
@ -161,7 +161,7 @@ public:
|
||||
// A heuristic text file matcher: If the data do not contain any character
|
||||
// below tab (9), detect as text.
|
||||
class HeuristicTextMagicMatcher : public IMagicMatcher {
|
||||
Q_DISABLE_COPY(HeuristicTextMagicMatcher);
|
||||
Q_DISABLE_COPY(HeuristicTextMagicMatcher)
|
||||
public:
|
||||
HeuristicTextMagicMatcher() {}
|
||||
virtual bool matches(const QByteArray &data) const;
|
||||
@ -539,7 +539,7 @@ namespace Internal {
|
||||
// MimeDatabase helpers: Generic parser for a sequence of <mime-type>.
|
||||
// Calls abstract handler function process for MimeType it finds.
|
||||
class BaseMimeTypeParser {
|
||||
Q_DISABLE_COPY(BaseMimeTypeParser);
|
||||
Q_DISABLE_COPY(BaseMimeTypeParser)
|
||||
public:
|
||||
BaseMimeTypeParser();
|
||||
virtual ~BaseMimeTypeParser() {}
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include "coreplugin/icore.h"
|
||||
#include "coreplugin/threadmanager.h"
|
||||
|
||||
const float FlightGearBridge::FT2M = 0.3048;
|
||||
const float FlightGearBridge::KT2MPS = 0.514444444;
|
||||
const float FlightGearBridge::INHG2KPA = 3.386;
|
||||
|
||||
FlightGearBridge::FlightGearBridge()
|
||||
{
|
||||
// move to thread
|
||||
|
@ -68,9 +68,9 @@ private slots:
|
||||
void telStatsUpdated(UAVObject* obj);
|
||||
|
||||
private:
|
||||
static const float FT2M = 0.3048;
|
||||
static const float KT2MPS = 0.514444444;
|
||||
static const float INHG2KPA = 3.386;
|
||||
static const float FT2M;
|
||||
static const float KT2MPS;
|
||||
static const float INHG2KPA;
|
||||
|
||||
QUdpSocket* inSocket;
|
||||
QUdpSocket* outSocket;
|
||||
|
@ -65,6 +65,21 @@
|
||||
#include <coreplugin/threadmanager.h>
|
||||
#include <math.h>
|
||||
|
||||
const float Il2Bridge::FT2M = 0.3048;
|
||||
const float Il2Bridge::KT2MPS = 0.514444444;
|
||||
const float Il2Bridge::MPS2KMH = 3.6;
|
||||
const float Il2Bridge::KMH2MPS = (1.0/3.6);
|
||||
const float Il2Bridge::INHG2KPA = 3.386;
|
||||
const float Il2Bridge::RAD2DEG = (180.0/M_PI);
|
||||
const float Il2Bridge::DEG2RAD = (M_PI/180.0);
|
||||
const float Il2Bridge::M2DEG = 60.*1852.; // 60 miles per degree times 1852 meters per mile
|
||||
const float Il2Bridge::DEG2M = (1.0/(60.*1852.));
|
||||
const float Il2Bridge::AIR_CONST = 287.058; // J/(kg*K)
|
||||
const float Il2Bridge::GROUNDDENSITY = 1.225; // kg/m³ ;)
|
||||
const float Il2Bridge::TEMP_GROUND = (15.0 + 273.0); // 15°C in Kelvin
|
||||
const float Il2Bridge::TEMP_LAPSE_RATE = -0.0065; //degrees per meter
|
||||
const float Il2Bridge::AIR_CONST_FACTOR = -0.0341631947363104; //several nature constants calculated into one
|
||||
|
||||
Il2Bridge::Il2Bridge(QString il2HostName, int il2Port, QString il2Latitude, QString il2Longitude)
|
||||
{
|
||||
// Init fields
|
||||
|
@ -103,20 +103,20 @@ private slots:
|
||||
void telStatsUpdated(UAVObject* obj);
|
||||
|
||||
private:
|
||||
static const float FT2M = 0.3048;
|
||||
static const float KT2MPS = 0.514444444;
|
||||
static const float MPS2KMH = 3.6;
|
||||
static const float KMH2MPS = (1.0/3.6);
|
||||
static const float INHG2KPA = 3.386;
|
||||
static const float RAD2DEG = (180.0/M_PI);
|
||||
static const float DEG2RAD = (M_PI/180.0);
|
||||
static const float M2DEG = 60.*1852.; // 60 miles per degree times 1852 meters per mile
|
||||
static const float DEG2M = (1.0/(60.*1852.));
|
||||
static const float AIR_CONST = 287.058; // J/(kg*K)
|
||||
static const float GROUNDDENSITY = 1.225; // kg/m³ ;)
|
||||
static const float TEMP_GROUND = (15.0 + 273.0); // 15°C in Kelvin
|
||||
static const float TEMP_LAPSE_RATE = -0.0065; //degrees per meter
|
||||
static const float AIR_CONST_FACTOR = -0.0341631947363104; //several nature constants calculated into one
|
||||
static const float FT2M;
|
||||
static const float KT2MPS;
|
||||
static const float MPS2KMH;
|
||||
static const float KMH2MPS;
|
||||
static const float INHG2KPA;
|
||||
static const float RAD2DEG;
|
||||
static const float DEG2RAD;
|
||||
static const float M2DEG;
|
||||
static const float DEG2M;
|
||||
static const float AIR_CONST;
|
||||
static const float GROUNDDENSITY;
|
||||
static const float TEMP_GROUND;
|
||||
static const float TEMP_LAPSE_RATE;
|
||||
static const float AIR_CONST_FACTOR;
|
||||
|
||||
struct flightParams current;
|
||||
struct flightParams old;
|
||||
|
Loading…
x
Reference in New Issue
Block a user