From 293a2ee573d60358f22f1cb09857413254525c7f Mon Sep 17 00:00:00 2001 From: James Cotton Date: Wed, 13 Jun 2012 18:14:20 -0500 Subject: [PATCH] Rename some of the revo calibration methods --- .../src/plugins/config/configrevowidget.cpp | 31 ++++++++++++++----- .../src/plugins/config/configrevowidget.h | 4 +-- .../src/plugins/config/revosensors.ui | 4 +-- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp b/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp index c0ab2b26b..f8703e93d 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp @@ -215,7 +215,7 @@ ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) : // Connect the signals connect(m_ui->accelBiasStart, SIGNAL(clicked()), this, SLOT(launchAccelBiasCalibration())); - connect(m_ui->sixPointsStart, SIGNAL(clicked()), this, SLOT(sixPointCalibrationMode())); + connect(m_ui->sixPointsStart, SIGNAL(clicked()), this, SLOT(doStartSixPointCalibration())); connect(m_ui->sixPointsSave, SIGNAL(clicked()), this, SLOT(savePositionData())); // Leave this timer permanently connected. The timer itself is started and stopped. @@ -342,7 +342,7 @@ void ConfigRevoWidget::incrementProgress() } } -void ConfigRevoWidget::sensorsUpdated(UAVObject * obj) +void ConfigRevoWidget::doGetSixPointCalibrationMeasurement(UAVObject * obj) { QMutexLocker lock(&sensorsUpdateLock); @@ -380,8 +380,8 @@ void ConfigRevoWidget::sensorsUpdated(UAVObject * obj) Q_ASSERT(accels); Magnetometer * mag = Magnetometer::GetInstance(getObjectManager()); Q_ASSERT(mag); - disconnect(accels,SIGNAL(objectUpdated(UAVObject*)),this,SLOT(sensorsUpdated(UAVObject*))); - disconnect(mag,SIGNAL(objectUpdated(UAVObject*)),this,SLOT(sensorsUpdated(UAVObject*))); + disconnect(accels,SIGNAL(objectUpdated(UAVObject*)),this,SLOT(doGetSixPointCalibrationMeasurement(UAVObject*))); + disconnect(mag,SIGNAL(objectUpdated(UAVObject*)),this,SLOT(doGetSixPointCalibrationMeasurement(UAVObject*))); m_ui->sixPointsSave->setEnabled(true); #ifdef SIX_POINT_CAL_ACCEL @@ -451,8 +451,8 @@ void ConfigRevoWidget::savePositionData() Magnetometer * mag = Magnetometer::GetInstance(getObjectManager()); Q_ASSERT(mag); - connect(accels, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(sensorsUpdated(UAVObject*))); - connect(mag, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(sensorsUpdated(UAVObject*))); + connect(accels, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(doGetSixPointCalibrationMeasurement(UAVObject*))); + connect(mag, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(doGetSixPointCalibrationMeasurement(UAVObject*))); m_ui->sixPointCalibInstructions->append("Hold..."); } @@ -606,7 +606,7 @@ void ConfigRevoWidget::computeScaleBias() /** Six point calibration mode */ -void ConfigRevoWidget::sixPointCalibrationMode() +void ConfigRevoWidget::doStartSixPointCalibration() { RevoCalibration * revoCalibration = RevoCalibration::GetInstance(getObjectManager()); HomeLocation * homeLocation = HomeLocation::GetInstance(getObjectManager()); @@ -747,6 +747,23 @@ void ConfigRevoWidget::drawVariancesGraph() mag_z->setTransform(QTransform::fromScale(1,mag_z_var),false); } +/** + * Connect sensor updates and timeout for measuring the noise + */ +void ConfigRevoWidget::doStartNoiseMeasurement() +{ + +} + +/** + * Called when any of the sensors are updated. Stores the sample for measuring the + * variance at the end + */ +void ConfigRevoWidget::doGetNoiseSample(UAVObject *) +{ + +} + /** * Called by the ConfigTaskWidget parent when RevoCalibration is updated * to update the UI diff --git a/ground/openpilotgcs/src/plugins/config/configrevowidget.h b/ground/openpilotgcs/src/plugins/config/configrevowidget.h index aaaa39880..865cec32b 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevowidget.h +++ b/ground/openpilotgcs/src/plugins/config/configrevowidget.h @@ -104,8 +104,8 @@ private slots: virtual void refreshWidgetsValues(UAVObject * obj=NULL); void savePositionData(); void computeScaleBias(); - void sixPointCalibrationMode(); - void sensorsUpdated(UAVObject * obj); + void doStartSixPointCalibration(); + void doGetSixPointCalibrationMeasurement(UAVObject * obj); void doGetAccelBiasData(UAVObject*); protected: diff --git a/ground/openpilotgcs/src/plugins/config/revosensors.ui b/ground/openpilotgcs/src/plugins/config/revosensors.ui index 914655724..7b1199003 100644 --- a/ground/openpilotgcs/src/plugins/config/revosensors.ui +++ b/ground/openpilotgcs/src/plugins/config/revosensors.ui @@ -174,7 +174,7 @@ Tip: lower is better! - + false @@ -189,7 +189,7 @@ Hint: run this with engines at cruising speed. - + true