Commit b8a41f1f authored by Lorenz Meier's avatar Lorenz Meier

Fixed a number of compile warnings

parent b965a4b8
......@@ -46,8 +46,8 @@ LogCompressor::LogCompressor(QString logFileName, QString outFileName, QString d
outFileName(outFileName),
running(true),
currentDataLine(0),
holeFillingEnabled(true),
delimiter(delimiter)
delimiter(delimiter),
holeFillingEnabled(true)
{
}
......
......@@ -395,7 +395,7 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
{
if (escReceived)
{
if (escIndex < sizeof(escBytes))
if (escIndex < static_cast<int>(sizeof(escBytes)))
{
escBytes[escIndex] = byte;
//qDebug() << "GOT BYTE ESC:" << byte;
......
......@@ -49,6 +49,13 @@ This file is part of the QGROUNDCONTROL project
HSIDisplay::HSIDisplay(QWidget *parent) :
HDDisplay(NULL, "HSI", parent),
dragStarted(false),
leftDragStarted(false),
mouseHasMoved(false),
startX(0.0f),
startY(0.0f),
actionPending(false),
directSending(false),
gpsSatellites(),
satellitesUsed(0),
attXSet(0.0f),
......@@ -88,6 +95,8 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
uiZSetCoordinate(0.0f),
uiYawSet(0.0f),
metricWidth(4.0),
xCenterPos(0),
yCenterPos(0),
positionLock(false),
attControlEnabled(false),
xyControlEnabled(false),
......@@ -97,14 +106,20 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
gpsFix(0),
visionFix(0),
laserFix(0),
iruFix(0),
mavInitialized(false),
bottomMargin(10.0f),
dragStarted(false),
topMargin(12.0f),
leftDragStarted(false),
mouseHasMoved(false),
actionPending(false),
directSending(false),
bottomMargin(10.0f),
attControlKnown(false),
xyControlKnown(false),
zControlKnown(false),
yawControlKnown(false),
positionFixKnown(false),
visionFixKnown(false),
gpsFixKnown(false),
iruFixKnown(false),
setPointKnown(false),
positionSetPointKnown(false),
userSetPointSet(false),
userXYSetPointSet(false),
userZSetPointSet(false),
......
......@@ -162,20 +162,6 @@ protected:
double refToMetric(double ref);
/** @brief Metric body coordinates to screen coordinates */
QPointF metricBodyToScreen(QPointF metric);
QMap<int, QString> objectNames;
QMap<int, int> objectTypes;
QMap<int, float> objectQualities;
QMap<int, float> objectBearings;
QMap<int, float> objectDistances;
bool dragStarted;
bool leftDragStarted;
bool mouseHasMoved;
float startX;
float startY;
QTimer statusClearTimer;
QString statusMessage;
bool actionPending;
bool directSending;
/**
* @brief Private data container class to be used within the HSI widget
......@@ -212,6 +198,21 @@ protected:
friend class HSIDisplay;
};
QMap<int, QString> objectNames;
QMap<int, int> objectTypes;
QMap<int, float> objectQualities;
QMap<int, float> objectBearings;
QMap<int, float> objectDistances;
bool dragStarted;
bool leftDragStarted;
bool mouseHasMoved;
float startX;
float startY;
QTimer statusClearTimer;
QString statusMessage;
bool actionPending;
bool directSending;
QMap<int, GPSSatellite*> gpsSatellites;
unsigned int satellitesUsed;
......@@ -275,8 +276,8 @@ protected:
int laserFix; ///< Localization dimensions based on laser
int iruFix; ///< Localization dimensions based on ultrasound
bool mavInitialized; ///< The MAV is initialized once the setpoint has been received
float bottomMargin; ///< Margin on the bottom of the page, in virtual coordinates
float topMargin; ///< Margin on top of the page, in virtual coordinates
float bottomMargin; ///< Margin on the bottom of the page, in virtual coordinates
bool attControlKnown; ///< Attitude control status known flag
bool xyControlKnown; ///< XY control status known flag
......
......@@ -613,7 +613,8 @@ bool QGCDataPlot2D::calculateRegression(QString xName, QString yName, QString me
function = tr("Regression method %1 not found").arg(method);
}
delete x, y;
delete x;
delete y;
} else {
// xName == yName
function = tr("Please select different X and Y dimensions, not %1 = %2").arg(xName, yName);
......
......@@ -4,8 +4,8 @@
QGCWaypointListMulti::QGCWaypointListMulti(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCWaypointListMulti),
offline_uas_id(0)
offline_uas_id(0),
ui(new Ui::QGCWaypointListMulti)
{
ui->setupUi(this);
setMinimumSize(600, 80);
......
......@@ -338,6 +338,7 @@ int WaypointList::addCurrentPositionWaypoint()
return 1;
}
}
return 1;
}
void WaypointList::updateStatusLabel(const QString &string)
......
......@@ -28,6 +28,7 @@ void WaypointViewOnlyView::changedAutoContinue(int state)
void WaypointViewOnlyView::changedCurrent(int state)
//This is a slot receiving signals from QCheckBox m_ui->current. The state given here is whatever the user has clicked and not the true "current" value onboard.
{
Q_UNUSED(state);
//qDebug() << "Trof: WaypointViewOnlyView::changedCurrent(" << state << ") ID:" << wp->getId();
m_ui->current->blockSignals(true);
......
......@@ -44,7 +44,8 @@ bool QGCMAVLinkMessageSender::sendMessage()
bool QGCMAVLinkMessageSender::sendMessage(unsigned int msgid)
{
if (msgid == 0 || msgid > 255 || messageInfo[msgid].name == "" || messageInfo[msgid].name == "EMPTY")
QString msgname(messageInfo[msgid].name);
if (msgid == 0 || msgid > 255 || messageInfo[msgid].name == NULL || msgname.compare(QString("EMPTY")))
{
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment