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

Ground/AHRSCalibration: Keep in sync with object changes

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1866 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-10-03 22:08:34 +00:00 committed by peabody124
parent 646b65564e
commit 07f8a227fa
2 changed files with 2 additions and 17 deletions

View File

@ -368,10 +368,6 @@ void ConfigAHRSWidget::attitudeRawUpdated(UAVObject * obj)
saveAHRSCalibration(); // Saves the result to SD.
/* Cleanup original settings */
obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSSettings")));
obj->getField(QString("UpdateRaw"))->setValue(initialUpdateRaw);
obj->getField(QString("UpdateFiltered"))->setValue(initialUpdateFiltered);
obj->updated();
getObjectManager()->getObject(QString("AttitudeRaw"))->setMetadata(initialMdata);
}
}
@ -596,21 +592,12 @@ void ConfigAHRSWidget::sixPointCalibrationMode()
gyro_accum_y.clear();
gyro_accum_z.clear();
/* Make sure we get AttitudeRaw updates, and skip AttitudeActual (for speed) */
obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSSettings")));
field = obj->getField(QString("UpdateRaw"));
initialUpdateRaw = field->getValue().toString();
field->setValue("TRUE");
field = obj->getField(QString("UpdateFiltered"));
initialUpdateFiltered = field->getValue().toString();
field->setValue("FALSE");
obj->updated();
/* Need to get as many AttitudeRaw updates as possible */
obj = getObjectManager()->getObject(QString("AttitudeRaw"));
initialMdata = obj->getMetadata();
UAVObject::Metadata mdata = initialMdata;
mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
mdata.flightTelemetryUpdatePeriod = 20;
obj->setMetadata(mdata);
/* Show instructions and enable controls */

View File

@ -92,8 +92,6 @@ private:
int position;
UAVObject::Metadata initialMdata;
QString initialUpdateRaw;
QString initialUpdateFiltered;
double listMean(QList<double> list);