mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
OP-38 Ground / Configuration gadget: automatically save results of 6-point calibration to SD (consistent with behaviour of sensor noise calibration). Other smaller updates.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1548 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
ce6a4325e4
commit
5c4ba7140b
@ -34,7 +34,7 @@
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>341</width>
|
||||
<height>141</height>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
@ -100,7 +100,7 @@ Hint: run this with engines at cruising speed.</string>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>390</y>
|
||||
<y>380</y>
|
||||
<width>111</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
@ -113,7 +113,7 @@ Hint: run this with engines at cruising speed.</string>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>380</y>
|
||||
<y>370</y>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@ -171,14 +171,14 @@ Hint: run this with engines at cruising speed.</string>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<widget class="QCheckBox" name="homeLocation">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>380</y>
|
||||
<x>320</x>
|
||||
<y>370</y>
|
||||
<width>201</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -254,9 +254,9 @@ specific calibration button on top of the screen.</string>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<x>370</x>
|
||||
<y>10</y>
|
||||
<width>271</width>
|
||||
<width>251</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -302,6 +302,19 @@ specific calibration button on top of the screen.</string>
|
||||
<string>Save Position</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="indoorFlight">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>400</y>
|
||||
<width>201</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Indoor flight mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
@ -187,7 +187,7 @@ ConfigAHRSWidget::ConfigAHRSWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
connect(m_ahrs->ahrsSettingsRequest, SIGNAL(clicked()), this, SLOT(ahrsSettingsRequest()));
|
||||
connect(m_ahrs->ahrsSettingsSaveRAM, SIGNAL(clicked()), this, SLOT(ahrsSettingsSaveRAM()));
|
||||
connect(m_ahrs->ahrsSettingsSaveSD, SIGNAL(clicked()), this, SLOT(ahrsSettingsSaveSD()));
|
||||
connect(m_ahrs->sixPointsStart, SIGNAL(clicked()), this, SLOT(calibrationMode()));
|
||||
connect(m_ahrs->sixPointsStart, SIGNAL(clicked()), this, SLOT(sixPointCalibrationMode()));
|
||||
connect(m_ahrs->sixPointsSave, SIGNAL(clicked()), this, SLOT(savePositionData()));
|
||||
connect(parent, SIGNAL(autopilotConnected()),this, SLOT(ahrsSettingsRequest()));
|
||||
|
||||
@ -350,6 +350,7 @@ void ConfigAHRSWidget::attitudeRawUpdated(UAVObject * obj)
|
||||
computeScaleBias();
|
||||
m_ahrs->sixPointsStart->setEnabled(true);
|
||||
m_ahrs->sixPointsSave->setEnabled(false);
|
||||
saveAHRSCalibration(); // Saves the result to SD.
|
||||
|
||||
/* Cleanup original settings */
|
||||
obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSSettings")));
|
||||
@ -521,7 +522,10 @@ void ConfigAHRSWidget::computeScaleBias()
|
||||
|
||||
}
|
||||
|
||||
void ConfigAHRSWidget::calibrationMode()
|
||||
/**
|
||||
Six point calibration mode
|
||||
*/
|
||||
void ConfigAHRSWidget::sixPointCalibrationMode()
|
||||
{
|
||||
UAVObject *obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSCalibration")));
|
||||
|
||||
@ -619,8 +623,15 @@ void ConfigAHRSWidget::ahrsSettingsRequest()
|
||||
UAVObject *obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSSettings")));
|
||||
obj->requestUpdate();
|
||||
UAVObjectField *field = obj->getField(QString("Algorithm"));
|
||||
m_ahrs->algorithm->setCurrentIndex(m_ahrs->algorithm->findText(field->getValue().toString()));
|
||||
if (field)
|
||||
m_ahrs->algorithm->setCurrentIndex(m_ahrs->algorithm->findText(field->getValue().toString()));
|
||||
drawVariancesGraph();
|
||||
|
||||
obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("HomeLocation")));
|
||||
field = obj->getField(QString("Indoor"));
|
||||
if (field)
|
||||
m_ahrs->homeLocation->setEnabled(field->getValue().toBool());
|
||||
|
||||
m_ahrs->ahrsCalibStart->setEnabled(true);
|
||||
m_ahrs->sixPointsStart->setEnabled(true);
|
||||
m_ahrs->calibInstructions->setText(QString("Press \"Start\" above to calibrate."));
|
||||
|
@ -100,7 +100,7 @@ private slots:
|
||||
void ahrsSettingsSaveSD();
|
||||
void savePositionData();
|
||||
void computeScaleBias();
|
||||
void calibrationMode();
|
||||
void sixPointCalibrationMode();
|
||||
void attitudeRawUpdated(UAVObject * obj);
|
||||
protected:
|
||||
void showEvent(QShowEvent *event);
|
||||
|
Loading…
Reference in New Issue
Block a user