1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

Rename some of the revo calibration methods

This commit is contained in:
James Cotton 2012-06-13 18:14:20 -05:00
parent f07e1fc4e1
commit 293a2ee573
3 changed files with 28 additions and 11 deletions

View File

@ -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

View File

@ -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:

View File

@ -174,7 +174,7 @@ Tip: lower is better!</string>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="ahrsCalibStart">
<widget class="QPushButton" name="noiseMeasurementStart">
<property name="enabled">
<bool>false</bool>
</property>
@ -189,7 +189,7 @@ Hint: run this with engines at cruising speed.</string>
</widget>
</item>
<item>
<widget class="QProgressBar" name="calibProgress">
<widget class="QProgressBar" name="noiseMeasurementProgress">
<property name="enabled">
<bool>true</bool>
</property>