From 07f8a227faabf01a9af4d7e8c352e67306150b7d Mon Sep 17 00:00:00 2001 From: peabody124 Date: Sun, 3 Oct 2010 22:08:34 +0000 Subject: [PATCH] Ground/AHRSCalibration: Keep in sync with object changes git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1866 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/config/configahrswidget.cpp | 17 ++--------------- ground/src/plugins/config/configahrswidget.h | 2 -- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/ground/src/plugins/config/configahrswidget.cpp b/ground/src/plugins/config/configahrswidget.cpp index 1635d7cc6..2df5b3102 100644 --- a/ground/src/plugins/config/configahrswidget.cpp +++ b/ground/src/plugins/config/configahrswidget.cpp @@ -368,10 +368,6 @@ void ConfigAHRSWidget::attitudeRawUpdated(UAVObject * obj) saveAHRSCalibration(); // Saves the result to SD. /* Cleanup original settings */ - obj = dynamic_cast(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(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 */ diff --git a/ground/src/plugins/config/configahrswidget.h b/ground/src/plugins/config/configahrswidget.h index 6a403b5bf..acaad9748 100644 --- a/ground/src/plugins/config/configahrswidget.h +++ b/ground/src/plugins/config/configahrswidget.h @@ -92,8 +92,6 @@ private: int position; UAVObject::Metadata initialMdata; - QString initialUpdateRaw; - QString initialUpdateFiltered; double listMean(QList list);