Browse Source

Merge pull request #472 from DonLakeFlyer/ReorderWarnings

Reorder warnings
QGC4.4
Lorenz Meier 12 years ago
parent
commit
1518d2064b
  1. 1
      qgroundcontrol.pro
  2. 10
      src/comm/XbeeLink.cpp
  3. 32
      src/uas/UAS.cc
  4. 18
      src/ui/HUD.cc
  5. 3
      src/ui/MainWindow.cc
  6. 2
      src/ui/PrimaryFlightDisplay.cc
  7. 2
      src/ui/QGCBaseParamWidget.cc
  8. 2
      src/ui/QGCHilConfiguration.cc
  9. 2
      src/ui/QGCPX4VehicleConfig.cc
  10. 4
      src/ui/QGCSettingsWidget.cc
  11. 1
      src/ui/UASRawStatusView.cpp
  12. 5
      src/ui/configuration/AP2ConfigWidget.cc
  13. 5
      src/ui/configuration/AccelCalibrationConfig.cc
  14. 4
      src/ui/configuration/AdvParameterList.cc
  15. 3
      src/ui/configuration/AdvancedParamConfig.cc
  16. 3
      src/ui/configuration/AirspeedConfig.cc
  17. 1
      src/ui/configuration/ApmFirmwareConfig.cc
  18. 3
      src/ui/configuration/ApmPlaneLevel.cc
  19. 3
      src/ui/configuration/ArduCopterPidConfig.cc
  20. 3
      src/ui/configuration/ArduPlanePidConfig.cc
  21. 3
      src/ui/configuration/ArduRoverPidConfig.cc
  22. 9
      src/ui/configuration/BatteryMonitorConfig.cc
  23. 3
      src/ui/configuration/CameraGimbalConfig.cc
  24. 3
      src/ui/configuration/CompassConfig.cc
  25. 7
      src/ui/configuration/FailSafeConfig.cc
  26. 3
      src/ui/configuration/FrameTypeConfig.cc
  27. 3
      src/ui/configuration/OpticalFlowConfig.cc
  28. 4
      src/ui/configuration/ParamWidget.cc
  29. 7
      src/ui/configuration/RadioCalibrationConfig.cc
  30. 5
      src/ui/configuration/SonarConfig.cc
  31. 3
      src/ui/configuration/StandardParamConfig.cc
  32. 1
      src/ui/configuration/terminalconsole.cpp
  33. 2
      src/ui/designer/QGCRadioChannelDisplay.cpp
  34. 4
      src/ui/designer/QGCToolWidget.cc
  35. 2
      src/ui/linechart/IncrementalPlot.h
  36. 4
      src/ui/main/QGCViewModeSelection.cc
  37. 6
      src/ui/map/QGCMapToolBar.cc
  38. 3
      src/ui/uas/UASQuickView.cc
  39. 2
      src/ui/uas/UASQuickViewGaugeItem.cc
  40. 2
      src/ui/uas/UASQuickViewItemSelect.cc
  41. 4
      src/ui/uas/UASQuickViewTextItem.cc
  42. 1
      src/ui/uas/UASQuickViewTextItem.h

1
qgroundcontrol.pro

@ -129,7 +129,6 @@ MacBuild | LinuxBuild {
QMAKE_CXXFLAGS_WARN_ON += \ QMAKE_CXXFLAGS_WARN_ON += \
-Wall \ -Wall \
-Wno-unused-parameter \ -Wno-unused-parameter \
-Wno-reorder \
-Wno-unused-variable \ -Wno-unused-variable \
-Wno-narrowing \ -Wno-narrowing \
-Wno-unused-function -Wno-unused-function

10
src/comm/XbeeLink.cpp

@ -7,8 +7,14 @@
#include "XbeeLink.h" #include "XbeeLink.h"
XbeeLink::XbeeLink(QString portName, int baudRate) : XbeeLink::XbeeLink(QString portName, int baudRate) :
m_xbeeCon(NULL), m_portName(NULL), m_portNameLength(0), m_baudRate(baudRate), m_connected(false), m_id(-1), m_xbeeCon(NULL),
m_addrHigh(0), m_addrLow(0) m_id(-1),
m_portName(NULL),
m_portNameLength(0),
m_baudRate(baudRate),
m_connected(false),
m_addrHigh(0),
m_addrLow(0)
{ {
/* setup the xbee */ /* setup the xbee */

32
src/uas/UAS.cc

@ -115,23 +115,19 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
altitudeAMSL(0.0), altitudeAMSL(0.0),
altitudeRelative(0.0), altitudeRelative(0.0),
airSpeed(std::numeric_limits<double>::quiet_NaN()), globalEstimatorActive(false),
groundSpeed(std::numeric_limits<double>::quiet_NaN()),
latitude_gps(0.0),
longitude_gps(0.0),
altitude_gps(0.0),
speedX(0.0), speedX(0.0),
speedY(0.0), speedY(0.0),
speedZ(0.0), speedZ(0.0),
globalEstimatorActive(false),
latitude_gps(0.0),
longitude_gps(0.0),
altitude_gps(0.0),
nedPosGlobalOffset(0,0,0), nedPosGlobalOffset(0,0,0),
nedAttGlobalOffset(0,0,0), nedAttGlobalOffset(0,0,0),
waypointManager(this),
paramMgr(this),
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
receivedOverlayTimestamp(0.0), receivedOverlayTimestamp(0.0),
receivedObstacleListTimestamp(0.0), receivedObstacleListTimestamp(0.0),
@ -140,6 +136,10 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
receivedRGBDImageTimestamp(0.0), receivedRGBDImageTimestamp(0.0),
#endif #endif
airSpeed(std::numeric_limits<double>::quiet_NaN()),
groundSpeed(std::numeric_limits<double>::quiet_NaN()),
waypointManager(this),
attitudeKnown(false), attitudeKnown(false),
attitudeStamped(false), attitudeStamped(false),
lastAttitude(0), lastAttitude(0),
@ -148,7 +148,12 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
pitch(0.0), pitch(0.0),
yaw(0.0), yaw(0.0),
blockHomePositionChanges(false),
receivedMode(false),
paramsOnceRequested(false), paramsOnceRequested(false),
paramMgr(this),
simulation(0), simulation(0),
// The protected members. // The protected members.
@ -159,9 +164,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
hilEnabled(false), hilEnabled(false),
sensorHil(false), sensorHil(false),
lastSendTimeGPS(0), lastSendTimeGPS(0),
lastSendTimeSensors(0), lastSendTimeSensors(0)
blockHomePositionChanges(false),
receivedMode(false)
{ {
for (unsigned int i = 0; i<255;++i) for (unsigned int i = 0; i<255;++i)
{ {
@ -3070,6 +3073,11 @@ void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw
float pitchspeed, float yawspeed, double lat, double lon, double alt, float pitchspeed, float yawspeed, double lat, double lon, double alt,
float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc) float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc)
{ {
Q_UNUSED(time_us);
Q_UNUSED(xacc);
Q_UNUSED(yacc);
Q_UNUSED(zacc);
float q[4]; float q[4];
double cosPhi_2 = cos(double(roll) / 2.0); double cosPhi_2 = cos(double(roll) / 2.0);

18
src/ui/HUD.cc

@ -57,6 +57,7 @@ This file is part of the QGROUNDCONTROL project
*/ */
HUD::HUD(int width, int height, QWidget* parent) HUD::HUD(int width, int height, QWidget* parent)
: QLabel(parent), : QLabel(parent),
image(NULL),
uas(NULL), uas(NULL),
yawInt(0.0f), yawInt(0.0f),
mode(tr("UNKNOWN MODE")), mode(tr("UNKNOWN MODE")),
@ -111,12 +112,14 @@ HUD::HUD(int width, int height, QWidget* parent)
nextOfflineImage(""), nextOfflineImage(""),
HUDInstrumentsEnabled(false), HUDInstrumentsEnabled(false),
videoEnabled(true), videoEnabled(true),
imageLoggingEnabled(false),
xImageFactor(1.0), xImageFactor(1.0),
yImageFactor(1.0), yImageFactor(1.0),
imageLoggingEnabled(false), imageRequested(false)
imageRequested(false),
image(NULL)
{ {
Q_UNUSED(width);
Q_UNUSED(height);
// Set auto fill to false // Set auto fill to false
setAutoFillBackground(false); setAutoFillBackground(false);
@ -501,11 +504,18 @@ void HUD::paintText(QString text, QColor color, float fontSize, float refX, floa
*/ */
void HUD::setupGLView(float referencePositionX, float referencePositionY, float referenceWidth, float referenceHeight) void HUD::setupGLView(float referencePositionX, float referencePositionY, float referenceWidth, float referenceHeight)
{ {
Q_UNUSED(referencePositionX);
Q_UNUSED(referencePositionY);
Q_UNUSED(referenceWidth);
Q_UNUSED(referenceHeight);
#if 0
// code ifdef'ed out but left in to silence warnings
int pixelWidth = (int)(referenceWidth * scalingFactor); int pixelWidth = (int)(referenceWidth * scalingFactor);
int pixelHeight = (int)(referenceHeight * scalingFactor); int pixelHeight = (int)(referenceHeight * scalingFactor);
// Translate and scale the GL view in the virtual reference coordinate units on the screen // Translate and scale the GL view in the virtual reference coordinate units on the screen
int pixelPositionX = (int)((referencePositionX * scalingFactor) + xCenterOffset); int pixelPositionX = (int)((referencePositionX * scalingFactor) + xCenterOffset);
int pixelPositionY = this->height() - (referencePositionY * scalingFactor) + yCenterOffset - pixelHeight; int pixelPositionY = this->height() - (referencePositionY * scalingFactor) + yCenterOffset - pixelHeight;
#endif
} }
void HUD::paintRollPitchStrips() void HUD::paintRollPitchStrips()
@ -515,7 +525,7 @@ void HUD::paintRollPitchStrips()
void HUD::paintEvent(QPaintEvent *event) void HUD::paintEvent(QPaintEvent *event)
{ {
Q_UNUSED(event);
paintHUD(); paintHUD();
} }

3
src/ui/MainWindow.cc

@ -121,13 +121,13 @@ MainWindow::MainWindow(QWidget *parent):
currentStyle(QGC_MAINWINDOW_STYLE_DARK), currentStyle(QGC_MAINWINDOW_STYLE_DARK),
aboutToCloseFlag(false), aboutToCloseFlag(false),
changingViewsFlag(false), changingViewsFlag(false),
mavlink(new MAVLinkProtocol()),
centerStackActionGroup(new QActionGroup(this)), centerStackActionGroup(new QActionGroup(this)),
darkStyleFileName(defaultDarkStyle), darkStyleFileName(defaultDarkStyle),
lightStyleFileName(defaultLightStyle), lightStyleFileName(defaultLightStyle),
autoReconnect(false), autoReconnect(false),
simulationLink(NULL), simulationLink(NULL),
lowPowerMode(false), lowPowerMode(false),
mavlink(new MAVLinkProtocol()),
customMode(CUSTOM_MODE_NONE), customMode(CUSTOM_MODE_NONE),
menuActionHelper(new MenuActionHelper()) menuActionHelper(new MenuActionHelper())
{ {
@ -800,6 +800,7 @@ void MainWindow::loadDockWidget(const QString& name)
void MainWindow::addToCentralStackedWidget(QWidget* widget, VIEW_SECTIONS viewSection, const QString& title) void MainWindow::addToCentralStackedWidget(QWidget* widget, VIEW_SECTIONS viewSection, const QString& title)
{ {
Q_UNUSED(viewSection);
Q_UNUSED(title); Q_UNUSED(title);
Q_ASSERT(widget->objectName().length() != 0); Q_ASSERT(widget->objectName().length() != 0);

2
src/ui/PrimaryFlightDisplay.cc

@ -606,6 +606,8 @@ void PrimaryFlightDisplay::drawPitchScale(
bool drawNumbersRight bool drawNumbersRight
) { ) {
Q_UNUSED(intrusion);
float displayPitch = this->pitch; float displayPitch = this->pitch;
if (isnan(displayPitch)) if (isnan(displayPitch))
displayPitch = 0; displayPitch = 0;

2
src/ui/QGCBaseParamWidget.cc

@ -11,8 +11,8 @@
QGCBaseParamWidget::QGCBaseParamWidget(QWidget *parent) : QGCBaseParamWidget::QGCBaseParamWidget(QWidget *parent) :
QWidget(parent), QWidget(parent),
mav(NULL),
paramMgr(NULL), paramMgr(NULL),
mav(NULL),
updatingParamNameLock("") updatingParamNameLock("")
{ {
} }

2
src/ui/QGCHilConfiguration.cc

@ -48,7 +48,7 @@ QGCHilConfiguration::~QGCHilConfiguration()
void QGCHilConfiguration::setVersion(QString version) void QGCHilConfiguration::setVersion(QString version)
{ {
Q_UNUSED(version);
} }
void QGCHilConfiguration::on_simComboBox_currentIndexChanged(int index) void QGCHilConfiguration::on_simComboBox_currentIndexChanged(int index)

2
src/ui/QGCPX4VehicleConfig.cc

@ -355,6 +355,8 @@ void QGCPX4VehicleConfig::toggleCalibrationRC(bool enabled)
void QGCPX4VehicleConfig::toggleSpektrumPairing(bool enabled) void QGCPX4VehicleConfig::toggleSpektrumPairing(bool enabled)
{ {
Q_UNUSED(enabled);
if (!ui->dsm2RadioButton->isChecked() && !ui->dsmxRadioButton && !ui->dsmx8RadioButton) { if (!ui->dsm2RadioButton->isChecked() && !ui->dsmxRadioButton && !ui->dsmx8RadioButton) {
// Reject // Reject
QMessageBox warnMsgBox; QMessageBox warnMsgBox;

4
src/ui/QGCSettingsWidget.cc

@ -13,8 +13,8 @@
QGCSettingsWidget::QGCSettingsWidget(QWidget *parent, Qt::WindowFlags flags) : QGCSettingsWidget::QGCSettingsWidget(QWidget *parent, Qt::WindowFlags flags) :
QDialog(parent, flags), QDialog(parent, flags),
ui(new Ui::QGCSettingsWidget), mainWindow((MainWindow*)parent),
mainWindow((MainWindow*)parent) ui(new Ui::QGCSettingsWidget)
{ {
ui->setupUi(this); ui->setupUi(this);

1
src/ui/UASRawStatusView.cpp

@ -47,6 +47,7 @@ void UASRawStatusView::valueChanged(const int uasId, const QString& name, const
} }
void UASRawStatusView::resizeEvent(QResizeEvent *event) void UASRawStatusView::resizeEvent(QResizeEvent *event)
{ {
Q_UNUSED(event);
m_tableDirty = true; m_tableDirty = true;
} }

5
src/ui/configuration/AP2ConfigWidget.cc

@ -25,7 +25,10 @@ void AP2ConfigWidget::activeUASSet(UASInterface *uas)
void AP2ConfigWidget::parameterChanged(int uas, int component, QString parameterName, QVariant value) void AP2ConfigWidget::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
Q_UNUSED(parameterName);
Q_UNUSED(value);
} }
void AP2ConfigWidget::showNullMAVErrorMessageBox() void AP2ConfigWidget::showNullMAVErrorMessageBox()
{ {

5
src/ui/configuration/AccelCalibrationConfig.cc

@ -71,6 +71,8 @@ void AccelCalibrationConfig::calibrateButtonClicked()
} }
void AccelCalibrationConfig::hideEvent(QHideEvent *evt) void AccelCalibrationConfig::hideEvent(QHideEvent *evt)
{ {
Q_UNUSED(evt);
if (!m_uas || !m_accelAckCount) if (!m_uas || !m_accelAckCount)
{ {
return; return;
@ -82,6 +84,9 @@ void AccelCalibrationConfig::hideEvent(QHideEvent *evt)
} }
void AccelCalibrationConfig::uasTextMessageReceived(int uasid, int componentid, int severity, QString text) void AccelCalibrationConfig::uasTextMessageReceived(int uasid, int componentid, int severity, QString text)
{ {
Q_UNUSED(uasid);
Q_UNUSED(componentid);
//command received: " Severity 1 //command received: " Severity 1
//Place APM Level and press any key" severity 5 //Place APM Level and press any key" severity 5
if (severity == 5) if (severity == 5)

4
src/ui/configuration/AdvParameterList.cc

@ -25,7 +25,9 @@ void AdvParameterList::setParameterMetaData(QString name,QString humanname,QStri
void AdvParameterList::parameterChanged(int uas, int component, QString parameterName, QVariant value) void AdvParameterList::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (!m_paramValueMap.contains(parameterName)) if (!m_paramValueMap.contains(parameterName))
{ {
ui.tableWidget->setRowCount(ui.tableWidget->rowCount()+1); ui.tableWidget->setRowCount(ui.tableWidget->rowCount()+1);

3
src/ui/configuration/AdvancedParamConfig.cc

@ -33,6 +33,9 @@ void AdvancedParamConfig::addCombo(QString title,QString description,QString par
} }
void AdvancedParamConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void AdvancedParamConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (m_paramToWidgetMap.contains(parameterName)) if (m_paramToWidgetMap.contains(parameterName))
{ {
if (value.type() == QVariant::Double) if (value.type() == QVariant::Double)

3
src/ui/configuration/AirspeedConfig.cc

@ -14,6 +14,9 @@ AirspeedConfig::~AirspeedConfig()
} }
void AirspeedConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void AirspeedConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "ARSPD_ENABLE") if (parameterName == "ARSPD_ENABLE")
{ {
if (value.toInt() == 0) if (value.toInt() == 0)

1
src/ui/configuration/ApmFirmwareConfig.cc

@ -387,6 +387,7 @@ void ApmFirmwareConfig::flashButtonClicked()
void ApmFirmwareConfig::firmwareListError(QNetworkReply::NetworkError error) void ApmFirmwareConfig::firmwareListError(QNetworkReply::NetworkError error)
{ {
Q_UNUSED(error);
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender()); QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
qDebug() << "Error!" << reply->errorString(); qDebug() << "Error!" << reply->errorString();
} }

3
src/ui/configuration/ApmPlaneLevel.cc

@ -52,6 +52,9 @@ void ApmPlaneLevel::manualCheckBoxToggled(bool checked)
} }
void ApmPlaneLevel::parameterChanged(int uas, int component, QString parameterName, QVariant value) void ApmPlaneLevel::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "MANUAL_LEVEL") if (parameterName == "MANUAL_LEVEL")
{ {
if (value.toInt() == 1) if (value.toInt() == 1)

3
src/ui/configuration/ArduCopterPidConfig.cc

@ -139,6 +139,9 @@ ArduCopterPidConfig::~ArduCopterPidConfig()
} }
void ArduCopterPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void ArduCopterPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (m_nameToBoxMap.contains(parameterName)) if (m_nameToBoxMap.contains(parameterName))
{ {
m_nameToBoxMap[parameterName]->setValue(value.toDouble()); m_nameToBoxMap[parameterName]->setValue(value.toDouble());

3
src/ui/configuration/ArduPlanePidConfig.cc

@ -66,6 +66,9 @@ ArduPlanePidConfig::~ArduPlanePidConfig()
} }
void ArduPlanePidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void ArduPlanePidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (m_nameToBoxMap.contains(parameterName)) if (m_nameToBoxMap.contains(parameterName))
{ {
m_nameToBoxMap[parameterName]->setValue(value.toDouble()); m_nameToBoxMap[parameterName]->setValue(value.toDouble());

3
src/ui/configuration/ArduRoverPidConfig.cc

@ -73,6 +73,9 @@ void ArduRoverPidConfig::refreshButtonClicked()
void ArduRoverPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void ArduRoverPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (nameToBoxMap.contains(parameterName)) if (nameToBoxMap.contains(parameterName))
{ {
nameToBoxMap[parameterName]->setValue(value.toFloat()); nameToBoxMap[parameterName]->setValue(value.toFloat());

9
src/ui/configuration/BatteryMonitorConfig.cc

@ -49,6 +49,7 @@ void BatteryMonitorConfig::activeUASSet(UASInterface *uas)
} }
void BatteryMonitorConfig::alertOnLowClicked(bool checked) void BatteryMonitorConfig::alertOnLowClicked(bool checked)
{ {
Q_UNUSED(checked);
} }
void BatteryMonitorConfig::calcDividerSet() void BatteryMonitorConfig::calcDividerSet()
@ -246,6 +247,11 @@ BatteryMonitorConfig::~BatteryMonitorConfig()
} }
void BatteryMonitorConfig::batteryChanged(UASInterface* uas, double voltage, double current, double percent, int seconds) void BatteryMonitorConfig::batteryChanged(UASInterface* uas, double voltage, double current, double percent, int seconds)
{ {
Q_UNUSED(uas);
Q_UNUSED(current);
Q_UNUSED(percent);
Q_UNUSED(seconds);
ui.calcVoltsLineEdit->setText(QString::number(voltage,'f',2)); ui.calcVoltsLineEdit->setText(QString::number(voltage,'f',2));
if (ui.measuredVoltsLineEdit->text() == "") if (ui.measuredVoltsLineEdit->text() == "")
{ {
@ -255,6 +261,9 @@ void BatteryMonitorConfig::batteryChanged(UASInterface* uas, double voltage, dou
void BatteryMonitorConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void BatteryMonitorConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "VOLT_DIVIDER") if (parameterName == "VOLT_DIVIDER")
{ {
ui.calcDividerLineEdit->setText(QString::number(value.toFloat(),'f',4)); ui.calcDividerLineEdit->setText(QString::number(value.toFloat(),'f',4));

3
src/ui/configuration/CameraGimbalConfig.cc

@ -265,6 +265,9 @@ CameraGimbalConfig::~CameraGimbalConfig()
void CameraGimbalConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void CameraGimbalConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "MNT_ANGMIN_TIL") //TILT if (parameterName == "MNT_ANGMIN_TIL") //TILT
{ {
ui.tiltAngleMinSpinBox->setValue(value.toInt() / 100.0); ui.tiltAngleMinSpinBox->setValue(value.toInt() / 100.0);

3
src/ui/configuration/CompassConfig.cc

@ -46,6 +46,9 @@ CompassConfig::~CompassConfig()
} }
void CompassConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void CompassConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "MAG_ENABLE") if (parameterName == "MAG_ENABLE")
{ {
if (value.toInt() == 0) if (value.toInt() == 0)

7
src/ui/configuration/FailSafeConfig.cc

@ -278,6 +278,9 @@ void FailSafeConfig::activeUASSet(UASInterface *uas)
} }
void FailSafeConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void FailSafeConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
//Arducopter //Arducopter
if (parameterName == "FS_THR_ENABLE") if (parameterName == "FS_THR_ENABLE")
{ {
@ -414,6 +417,8 @@ void FailSafeConfig::remoteControlChannelRawChanges(int chan,float value)
} }
void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2, float act3, float act4, float act5, float act6, float act7, float act8) void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2, float act3, float act4, float act5, float act6, float act7, float act8)
{ {
Q_UNUSED(time);
ui.radio1Out->setValue(act1); ui.radio1Out->setValue(act1);
ui.radio2Out->setValue(act2); ui.radio2Out->setValue(act2);
ui.radio3Out->setValue(act3); ui.radio3Out->setValue(act3);
@ -425,6 +430,8 @@ void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2,
} }
void FailSafeConfig::gpsStatusChanged(UASInterface* uas,int fixtype) void FailSafeConfig::gpsStatusChanged(UASInterface* uas,int fixtype)
{ {
Q_UNUSED(uas);
if (fixtype == 0 || fixtype == 1) if (fixtype == 0 || fixtype == 1)
{ {
ui.gpsLabel->setText("<h1>None</h1>"); ui.gpsLabel->setText("<h1>None</h1>");

3
src/ui/configuration/FrameTypeConfig.cc

@ -52,6 +52,9 @@ FrameTypeConfig::~FrameTypeConfig()
} }
void FrameTypeConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void FrameTypeConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "FRAME") if (parameterName == "FRAME")
{ {
ui.xRadioButton->setEnabled(true); ui.xRadioButton->setEnabled(true);

3
src/ui/configuration/OpticalFlowConfig.cc

@ -13,6 +13,9 @@ OpticalFlowConfig::~OpticalFlowConfig()
} }
void OpticalFlowConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void OpticalFlowConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "FLOW_ENABLE") if (parameterName == "FLOW_ENABLE")
{ {
if (value.toInt() == 0) if (value.toInt() == 0)

4
src/ui/configuration/ParamWidget.cc

@ -48,6 +48,8 @@ ParamWidget::~ParamWidget()
void ParamWidget::setupInt(QString title,QString description,int value,int min,int max) void ParamWidget::setupInt(QString title,QString description,int value,int min,int max)
{ {
Q_UNUSED(value);
type = INT; type = INT;
ui.titleLabel->setText("<h3>" + title + "</h3>"); ui.titleLabel->setText("<h3>" + title + "</h3>");
ui.descriptionLabel->setText(description); ui.descriptionLabel->setText(description);
@ -71,6 +73,8 @@ void ParamWidget::setupInt(QString title,QString description,int value,int min,i
void ParamWidget::setupDouble(QString title,QString description,double value,double min,double max) void ParamWidget::setupDouble(QString title,QString description,double value,double min,double max)
{ {
Q_UNUSED(value);
type = DOUBLE; type = DOUBLE;
ui.titleLabel->setText("<h3>" + title + "</h3>"); ui.titleLabel->setText("<h3>" + title + "</h3>");
ui.descriptionLabel->setText(description); ui.descriptionLabel->setText(description);

7
src/ui/configuration/RadioCalibrationConfig.cc

@ -119,7 +119,10 @@ void RadioCalibrationConfig::remoteControlChannelRawChanged(int chan,float val)
void RadioCalibrationConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void RadioCalibrationConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
Q_UNUSED(parameterName);
Q_UNUSED(value);
} }
void RadioCalibrationConfig::guiUpdateTimerTick() void RadioCalibrationConfig::guiUpdateTimerTick()
{ {
@ -153,10 +156,12 @@ void RadioCalibrationConfig::guiUpdateTimerTick()
} }
void RadioCalibrationConfig::showEvent(QShowEvent *event) void RadioCalibrationConfig::showEvent(QShowEvent *event)
{ {
Q_UNUSED(event);
guiUpdateTimer->start(100); guiUpdateTimer->start(100);
} }
void RadioCalibrationConfig::hideEvent(QHideEvent *event) void RadioCalibrationConfig::hideEvent(QHideEvent *event)
{ {
Q_UNUSED(event);
guiUpdateTimer->stop(); guiUpdateTimer->stop();
} }
void RadioCalibrationConfig::calibrateButtonClicked() void RadioCalibrationConfig::calibrateButtonClicked()

5
src/ui/configuration/SonarConfig.cc

@ -32,6 +32,8 @@ void SonarConfig::checkBoxToggled(bool enabled)
} }
void SonarConfig::sonarTypeChanged(int index) void SonarConfig::sonarTypeChanged(int index)
{ {
Q_UNUSED(index);
if (!m_uas) if (!m_uas)
{ {
QMessageBox::information(0,tr("Error"),tr("Please connect to a MAV before attempting to set configuration")); QMessageBox::information(0,tr("Error"),tr("Please connect to a MAV before attempting to set configuration"));
@ -42,6 +44,9 @@ void SonarConfig::sonarTypeChanged(int index)
void SonarConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void SonarConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (parameterName == "SONAR_ENABLE") if (parameterName == "SONAR_ENABLE")
{ {
if (value.toInt() == 0) if (value.toInt() == 0)

3
src/ui/configuration/StandardParamConfig.cc

@ -31,6 +31,9 @@ void StandardParamConfig::addCombo(QString title,QString description,QString par
} }
void StandardParamConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) void StandardParamConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
if (paramToWidgetMap.contains(parameterName)) if (paramToWidgetMap.contains(parameterName))
{ {
if (value.type() == QVariant::Double) if (value.type() == QVariant::Double)

1
src/ui/configuration/terminalconsole.cpp

@ -257,6 +257,7 @@ void TerminalConsole::setBaudRate(int index)
void TerminalConsole::setLink(int index) void TerminalConsole::setLink(int index)
{ {
Q_UNUSED(index);
m_settings.name = ui->linkComboBox->currentText(); m_settings.name = ui->linkComboBox->currentText();
qDebug() << "Changed Link to:" << m_settings.name; qDebug() << "Changed Link to:" << m_settings.name;

2
src/ui/designer/QGCRadioChannelDisplay.cpp

@ -34,6 +34,8 @@ void QGCRadioChannelDisplay::setOrientation(Qt::Orientation orient)
void QGCRadioChannelDisplay::paintEvent(QPaintEvent *event) void QGCRadioChannelDisplay::paintEvent(QPaintEvent *event)
{ {
Q_UNUSED(event);
//Values range from 0-3000. //Values range from 0-3000.
//1500 is the middle, static servo value. //1500 is the middle, static servo value.
QPainter painter(this); QPainter painter(this);

4
src/ui/designer/QGCToolWidget.cc

@ -192,6 +192,10 @@ QList<QString> QGCToolWidget::getParamList()
} }
void QGCToolWidget::setParameterValue(int uas, int component, QString parameterName, const QVariant value) void QGCToolWidget::setParameterValue(int uas, int component, QString parameterName, const QVariant value)
{ {
Q_UNUSED(uas);
Q_UNUSED(component);
Q_UNUSED(value);
QString widgetName = getTitle(); QString widgetName = getTitle();
int size = settingsMap["count"].toInt(); int size = settingsMap["count"].toInt();
if (paramToItemMap.contains(parameterName)) if (paramToItemMap.contains(parameterName))

2
src/ui/linechart/IncrementalPlot.h

@ -61,8 +61,6 @@ private:
int d_count; int d_count;
QwtArray<double> d_x; QwtArray<double> d_x;
QwtArray<double> d_y; QwtArray<double> d_y;
QTimer *d_timer;
int d_timerCount;
}; };
/** /**

4
src/ui/main/QGCViewModeSelection.cc

@ -5,8 +5,8 @@
QGCViewModeSelection::QGCViewModeSelection(QWidget *parent) : QGCViewModeSelection::QGCViewModeSelection(QWidget *parent) :
QWidget(parent), QWidget(parent),
selected(false), ui(new Ui::QGCViewModeSelection),
ui(new Ui::QGCViewModeSelection) selected(false)
{ {
ui->setupUi(this); ui->setupUi(this);

6
src/ui/map/QGCMapToolBar.cc

@ -7,12 +7,12 @@ QGCMapToolBar::QGCMapToolBar(QWidget *parent) :
ui(new Ui::QGCMapToolBar), ui(new Ui::QGCMapToolBar),
map(NULL), map(NULL),
optionsMenu(this), optionsMenu(this),
mapTypesMenu(this),
trailPlotMenu(this), trailPlotMenu(this),
updateTimesMenu(this), updateTimesMenu(this),
mapTypesGroup(new QActionGroup(this)), mapTypesMenu(this),
trailSettingsGroup(new QActionGroup(this)), trailSettingsGroup(new QActionGroup(this)),
updateTimesGroup(new QActionGroup(this)) updateTimesGroup(new QActionGroup(this)),
mapTypesGroup(new QActionGroup(this))
{ {
ui->setupUi(this); ui->setupUi(this);
} }

3
src/ui/uas/UASQuickView.cc

@ -190,6 +190,7 @@ void UASQuickView::sortItems(int columncount)
} }
void UASQuickView::resizeEvent(QResizeEvent *evt) void UASQuickView::resizeEvent(QResizeEvent *evt)
{ {
Q_UNUSED(evt);
recalculateItemTextSizing(); recalculateItemTextSizing();
} }
void UASQuickView::recalculateItemTextSizing() void UASQuickView::recalculateItemTextSizing()
@ -273,6 +274,8 @@ void UASQuickView::valueChanged(const int uasId, const QString& name, const QStr
{ {
Q_UNUSED(uasId); Q_UNUSED(uasId);
Q_UNUSED(unit); Q_UNUSED(unit);
Q_UNUSED(msec);
bool ok; bool ok;
double value = variant.toDouble(&ok); double value = variant.toDouble(&ok);
QMetaType::Type metaType = static_cast<QMetaType::Type>(variant.type()); QMetaType::Type metaType = static_cast<QMetaType::Type>(variant.type());

2
src/ui/uas/UASQuickViewGaugeItem.cc

@ -15,6 +15,8 @@ void UASQuickViewGaugeItem::setTitle(QString title)
} }
void UASQuickViewGaugeItem::resizeEvent(QResizeEvent *event) void UASQuickViewGaugeItem::resizeEvent(QResizeEvent *event)
{ {
Q_UNUSED(event);
QFont valuefont = valueLabel->font(); QFont valuefont = valueLabel->font();
QFont titlefont = titleLabel->font(); QFont titlefont = titleLabel->font();
valuefont.setPixelSize(this->height() / 2.0); valuefont.setPixelSize(this->height() / 2.0);

2
src/ui/uas/UASQuickViewItemSelect.cc

@ -59,6 +59,8 @@ void UASQuickViewItemSelect::addItem(QString item,bool enabled)
} }
void UASQuickViewItemSelect::resizeEvent(QResizeEvent *event) void UASQuickViewItemSelect::resizeEvent(QResizeEvent *event)
{ {
Q_UNUSED(event);
/*for (int i=0;i<m_checkBoxList.size();i++) /*for (int i=0;i<m_checkBoxList.size();i++)
{ {
ui.gridLayout->removeWidget(m_checkBoxList[i]); ui.gridLayout->removeWidget(m_checkBoxList[i]);

4
src/ui/uas/UASQuickViewTextItem.cc

@ -119,7 +119,10 @@ void UASQuickViewTextItem::setValuePixelSize(int size)
void UASQuickViewTextItem::resizeEvent(QResizeEvent *event) void UASQuickViewTextItem::resizeEvent(QResizeEvent *event)
{ {
Q_UNUSED(event);
return; return;
#if 0
// code ifdef'ed out to silence warnings
QFont valuefont = valueLabel->font(); QFont valuefont = valueLabel->font();
QFont titlefont = titleLabel->font(); QFont titlefont = titleLabel->font();
valuefont.setPixelSize(this->height()); valuefont.setPixelSize(this->height());
@ -158,4 +161,5 @@ titlefont.setPixelSize(valuefont.pixelSize() / 2.0);
valueLabel->setFont(valuefont); valueLabel->setFont(valuefont);
titleLabel->setFont(titlefont); titleLabel->setFont(titlefont);
update(); update();
#endif
} }

1
src/ui/uas/UASQuickViewTextItem.h

@ -17,7 +17,6 @@ protected:
private: private:
QLabel *titleLabel; QLabel *titleLabel;
QLabel *valueLabel; QLabel *valueLabel;
QSpacerItem *spacerItem;
}; };
#endif // UASQUICKVIEWTEXTITEM_H #endif // UASQUICKVIEWTEXTITEM_H

Loading…
Cancel
Save