mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Get rid of yet more compile-time warnings.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2124 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
37a1f602b2
commit
ecb5c719d2
@ -280,8 +280,9 @@ void ConfigAHRSWidget::incrementProgress()
|
||||
*/
|
||||
void ConfigAHRSWidget::calibPhase2()
|
||||
{
|
||||
|
||||
UAVObject *obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSCalibration")));
|
||||
UAVObjectField *field = obj->getField(QString("measure_var"));
|
||||
// UAVObjectField *field = obj->getField(QString("measure_var"));
|
||||
|
||||
// This is a bit weird, but it is because we are expecting an update from the
|
||||
// OP board with the correct calibration values, and those only arrive on the object update
|
||||
@ -326,7 +327,7 @@ void ConfigAHRSWidget::attitudeRawUpdated(UAVObject * obj)
|
||||
UAVObjectField *gyro_field = obj->getField(QString("gyros_filtered"));
|
||||
UAVObjectField *mag_field = obj->getField(QString("magnetometers"));
|
||||
|
||||
Q_ASSERT(gyro_field != 0 && accel_field != 0 & mag_field != 0);
|
||||
Q_ASSERT(gyro_field != 0 && accel_field != 0 && mag_field != 0);
|
||||
|
||||
// This is necessary to prevent a race condition on disconnect signal and another update
|
||||
if (collectingData == true) {
|
||||
|
@ -29,6 +29,7 @@
|
||||
ConfigGadgetConfiguration::ConfigGadgetConfiguration(QString classId, QSettings* qSettings, QObject *parent) :
|
||||
IUAVGadgetConfiguration(classId, parent)
|
||||
{
|
||||
Q_UNUSED(qSettings);
|
||||
|
||||
}
|
||||
|
||||
@ -40,4 +41,5 @@ IUAVGadgetConfiguration *ConfigGadgetConfiguration::clone()
|
||||
|
||||
void ConfigGadgetConfiguration::saveConfig(QSettings* settings) const {
|
||||
|
||||
Q_UNUSED(settings)
|
||||
}
|
||||
|
@ -31,11 +31,14 @@
|
||||
ConfigGadgetOptionsPage::ConfigGadgetOptionsPage(ConfigGadgetConfiguration *config, QObject *parent)
|
||||
{
|
||||
//todo:implement
|
||||
Q_UNUSED(config);
|
||||
Q_UNUSED(parent);
|
||||
}
|
||||
|
||||
QWidget *ConfigGadgetOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
//todo:implement
|
||||
Q_UNUSED(parent);
|
||||
return new QWidget;
|
||||
}
|
||||
|
||||
|
@ -939,8 +939,10 @@ void ConfigServoWidget::updateChannels(UAVObject* controlCommand)
|
||||
}
|
||||
|
||||
|
||||
void ConfigServoWidget::updateChannelSlider(QSlider* slider, QLabel* min, QLabel* max, QCheckBox* rev, int value) {
|
||||
void ConfigServoWidget::updateChannelSlider(QSlider* slider, QLabel* min, QLabel* max, QCheckBox* rev, int value)
|
||||
{
|
||||
|
||||
Q_UNUSED(rev);
|
||||
if (firstUpdate) {
|
||||
// Reset all the min/max values of the sliders since we are
|
||||
// starting the calibration.
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <math.h>
|
||||
|
||||
static const double Pi = 3.14159265358979323846264338327950288419717;
|
||||
static double TwoPi = 2.0 * Pi;
|
||||
// static double TwoPi = 2.0 * Pi;
|
||||
|
||||
Edge::Edge(Node *sourceNode, Node *destNode)
|
||||
: arrowSize(10)
|
||||
|
@ -53,6 +53,8 @@ ConnectionManager::ConnectionManager(Internal::MainWindow *mainWindow, Internal:
|
||||
m_connectBtn(0),
|
||||
m_ioDev(NULL)
|
||||
{
|
||||
Q_UNUSED(mainWindow);
|
||||
|
||||
QVBoxLayout *top = new QVBoxLayout;
|
||||
top->setSpacing(0);
|
||||
top->setMargin(0);
|
||||
@ -121,6 +123,7 @@ void ConnectionManager::objectAdded(QObject *obj)
|
||||
|
||||
void ConnectionManager::aboutToRemoveObject(QObject *obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -129,26 +132,22 @@ void ConnectionManager::aboutToRemoveObject(QObject *obj)
|
||||
*/
|
||||
bool ConnectionManager::disconnectDevice()
|
||||
{
|
||||
|
||||
// Check if we are currently connected or not
|
||||
if(!m_ioDev)
|
||||
{
|
||||
return false; // We were not connected
|
||||
}
|
||||
else
|
||||
{
|
||||
//signal interested plugins that we are disconnecting the device
|
||||
emit deviceDisconnected();
|
||||
if(m_connectionDevice.connection)
|
||||
{
|
||||
m_connectionDevice.connection->closeDevice(m_connectionDevice.devName);
|
||||
m_ioDev = NULL;
|
||||
m_connectionDevice.connection = NULL;
|
||||
}
|
||||
|
||||
m_connectBtn->setText("Connect");
|
||||
m_availableDevList->setEnabled(true);
|
||||
//signal interested plugins that we are disconnecting the device
|
||||
emit deviceDisconnected();
|
||||
if(m_connectionDevice.connection)
|
||||
{
|
||||
m_connectionDevice.connection->closeDevice(m_connectionDevice.devName);
|
||||
m_ioDev = NULL;
|
||||
m_connectionDevice.connection = NULL;
|
||||
}
|
||||
|
||||
m_connectBtn->setText("Connect");
|
||||
m_availableDevList->setEnabled(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,6 +155,7 @@ void WorkspaceSettings::finish()
|
||||
|
||||
void WorkspaceSettings::textEdited(QString name)
|
||||
{
|
||||
Q_UNUSED(name);
|
||||
m_page->workspaceComboBox->setItemText(m_currentIndex, m_page->nameEdit->text());
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ DialGadgetOptionsPage::DialGadgetOptionsPage(DialGadgetConfiguration *config, QO
|
||||
QWidget *DialGadgetOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
|
||||
Q_UNUSED(parent);
|
||||
options_page = new Ui::DialGadgetOptionsPage();
|
||||
//main widget
|
||||
QWidget *optionsPageWidget = new QWidget;
|
||||
|
@ -429,6 +429,7 @@ void DialGadgetWidget::paintEvent(QPaintEvent *event)
|
||||
// nature of SVG dials.
|
||||
void DialGadgetWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
fitInView(m_background, Qt::KeepAspectRatio );
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ LineardialGadgetOptionsPage::LineardialGadgetOptionsPage(LineardialGadgetConfigu
|
||||
QWidget *LineardialGadgetOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
|
||||
Q_UNUSED(parent);
|
||||
options_page = new Ui::LineardialGadgetOptionsPage();
|
||||
//main widget
|
||||
QWidget *optionsPageWidget = new QWidget;
|
||||
|
@ -388,6 +388,7 @@ void LineardialGadgetWidget::paintEvent(QPaintEvent *event)
|
||||
// nature of SVG dials.
|
||||
void LineardialGadgetWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
fitInView(background, Qt::KeepAspectRatio );
|
||||
}
|
||||
|
||||
|
@ -378,6 +378,7 @@ void SoundNotifyPlugin::expireTimerHandler()
|
||||
|
||||
void SoundNotifyPlugin::stateChanged(Phonon::State newstate, Phonon::State oldstate)
|
||||
{
|
||||
Q_UNUSED(oldstate)
|
||||
if((newstate == Phonon::PausedState) ||
|
||||
(newstate == Phonon::StoppedState))
|
||||
{
|
||||
|
@ -43,6 +43,7 @@ SystemHealthGadgetOptionsPage::SystemHealthGadgetOptionsPage(SystemHealthGadgetC
|
||||
QWidget *SystemHealthGadgetOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
|
||||
Q_UNUSED(parent);
|
||||
options_page = new Ui::SystemHealthGadgetOptionsPage();
|
||||
//main widget
|
||||
QWidget *optionsPageWidget = new QWidget;
|
||||
|
@ -159,5 +159,6 @@ void SystemHealthGadgetWidget::paintEvent(QPaintEvent *event)
|
||||
// nature of SVG dials.
|
||||
void SystemHealthGadgetWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
fitInView(background, Qt::KeepAspectRatio );
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ QWidget *BrowserItemDelegate::createEditor(QWidget *parent,
|
||||
const QStyleOptionViewItem & option ,
|
||||
const QModelIndex & index ) const
|
||||
{
|
||||
Q_UNUSED(option)
|
||||
FieldTreeItem *item = static_cast<FieldTreeItem*>(index.internalPointer());
|
||||
QWidget *editor = item->createEditor(parent);
|
||||
Q_ASSERT(editor);
|
||||
@ -68,5 +69,7 @@ void BrowserItemDelegate::updateEditorGeometry(QWidget *editor,
|
||||
|
||||
QSize BrowserItemDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(index);
|
||||
return QSpinBox().sizeHint();
|
||||
}
|
||||
|
@ -164,6 +164,8 @@ void UAVObjectBrowserWidget::updateObjectPersistance(ObjectPersistence::Operatio
|
||||
|
||||
void UAVObjectBrowserWidget::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||
{
|
||||
Q_UNUSED(previous);
|
||||
|
||||
TreeItem *item = static_cast<TreeItem*>(current.internalPointer());
|
||||
bool enable = true;
|
||||
if (current == QModelIndex())
|
||||
|
@ -312,6 +312,7 @@ QVariant UAVObjectTreeModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool UAVObjectTreeModel::setData(const QModelIndex &index, const QVariant & value, int role)
|
||||
{
|
||||
Q_UNUSED(role)
|
||||
TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
|
||||
item->setData(value, index.column());
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user