mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-1538 Fixed some runtime warnings and debug logging.
This commit is contained in:
parent
26eff1bb4e
commit
2d17d64406
@ -187,14 +187,12 @@ void ConfigStabilizationWidget::updateThrottleCurveFromObject()
|
||||
UAVObject *stabBank = getObjectManager()->getObject(QString(m_pidTabBars.at(0)->tabData(m_currentPIDBank).toString()));
|
||||
|
||||
Q_ASSERT(stabBank);
|
||||
qDebug() << "updatingCurveFromObject" << stabBank->getName();
|
||||
|
||||
UAVObjectField *field = stabBank->getField("ThrustPIDScaleCurve");
|
||||
Q_ASSERT(field);
|
||||
|
||||
QList<double> curve;
|
||||
for (quint32 i = 0; i < field->getNumElements(); i++) {
|
||||
qDebug() << field->getName() << field->getElementNames().at(i) << "=>" << field->getValue(i);
|
||||
curve.append(field->getValue(i).toDouble());
|
||||
}
|
||||
|
||||
@ -214,7 +212,6 @@ void ConfigStabilizationWidget::updateObjectFromThrottleCurve()
|
||||
UAVObject *stabBank = getObjectManager()->getObject(QString(m_pidTabBars.at(0)->tabData(m_currentPIDBank).toString()));
|
||||
|
||||
Q_ASSERT(stabBank);
|
||||
qDebug() << "updatingObjectFromCurve" << stabBank->getName();
|
||||
|
||||
UAVObjectField *field = stabBank->getField("ThrustPIDScaleCurve");
|
||||
Q_ASSERT(field);
|
||||
@ -222,7 +219,6 @@ void ConfigStabilizationWidget::updateObjectFromThrottleCurve()
|
||||
QList<double> curve = ui->thrustPIDScalingCurve->getCurve();
|
||||
for (quint32 i = 0; i < field->getNumElements(); i++) {
|
||||
field->setValue(curve.at(i), i);
|
||||
qDebug() << field->getName() << field->getElementNames().at(i) << "<=" << curve.at(i);
|
||||
}
|
||||
|
||||
field = stabBank->getField("EnableThrustPIDScaling");
|
||||
@ -351,10 +347,8 @@ void ConfigStabilizationWidget::realtimeUpdatesSlot(bool value)
|
||||
|
||||
if (value && !realtimeUpdates->isActive()) {
|
||||
realtimeUpdates->start(AUTOMATIC_UPDATE_RATE);
|
||||
qDebug() << "Instant Update timer started.";
|
||||
} else if (!value && realtimeUpdates->isActive()) {
|
||||
realtimeUpdates->stop();
|
||||
qDebug() << "Instant Update timer stopped.";
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,7 +445,6 @@ void ConfigStabilizationWidget::pidBankChanged(int index)
|
||||
setWidgetBindingObjectEnabled(m_pidTabBars.at(0)->tabData(index).toString(), true);
|
||||
|
||||
m_currentPIDBank = index;
|
||||
qDebug() << "current bank:" << m_currentPIDBank;
|
||||
updateThrottleCurveFromObject();
|
||||
setDirty(dirty);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ private:
|
||||
static const int AUTOMATIC_UPDATE_RATE = 500;
|
||||
|
||||
static const int EXPO_CURVE_POINTS_COUNT = 100;
|
||||
static const double EXPO_CURVE_CONSTANT = 1.00695;
|
||||
static const double EXPO_CURVE_CONSTANT = 1.00695;
|
||||
|
||||
int boardModel;
|
||||
int m_pidBankCount;
|
||||
|
@ -47,8 +47,8 @@ MagicWaypointGadgetWidget::MagicWaypointGadgetWidget(QWidget *parent) : QLabel(p
|
||||
m_magicwaypoint->setupUi(this);
|
||||
|
||||
// Connect object updated event from UAVObject to also update check boxes
|
||||
connect(getPathDesired(), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(positionObjectChanged(UAVObject *)));
|
||||
connect(getPositionState(), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(positionObjectChanged(UAVObject *)));
|
||||
connect(getPathDesired(), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(positionStateChanged(UAVObject *)));
|
||||
connect(getPositionState(), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(positionStateChanged(UAVObject *)));
|
||||
|
||||
// Connect updates from the position widget to this widget
|
||||
connect(m_magicwaypoint->widgetPosition, SIGNAL(positionClicked(double, double)), this, SLOT(positionSelected(double, double)));
|
||||
|
@ -10,8 +10,6 @@ Rectangle {
|
||||
sourceComponent: scrollDecorator.flickableItem ? scrollBar : undefined
|
||||
}
|
||||
|
||||
Component.onDestruction: scrollLoader.sourceComponent = undefined
|
||||
|
||||
Component {
|
||||
id: scrollBar
|
||||
Rectangle {
|
||||
|
Loading…
Reference in New Issue
Block a user