mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +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:
parent
646b65564e
commit
07f8a227fa
@ -368,10 +368,6 @@ void ConfigAHRSWidget::attitudeRawUpdated(UAVObject * obj)
|
|||||||
saveAHRSCalibration(); // Saves the result to SD.
|
saveAHRSCalibration(); // Saves the result to SD.
|
||||||
|
|
||||||
/* Cleanup original settings */
|
/* 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);
|
getObjectManager()->getObject(QString("AttitudeRaw"))->setMetadata(initialMdata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -596,21 +592,12 @@ void ConfigAHRSWidget::sixPointCalibrationMode()
|
|||||||
gyro_accum_y.clear();
|
gyro_accum_y.clear();
|
||||||
gyro_accum_z.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 */
|
/* Need to get as many AttitudeRaw updates as possible */
|
||||||
obj = getObjectManager()->getObject(QString("AttitudeRaw"));
|
obj = getObjectManager()->getObject(QString("AttitudeRaw"));
|
||||||
initialMdata = obj->getMetadata();
|
initialMdata = obj->getMetadata();
|
||||||
UAVObject::Metadata mdata = initialMdata;
|
UAVObject::Metadata mdata = initialMdata;
|
||||||
mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||||
|
mdata.flightTelemetryUpdatePeriod = 20;
|
||||||
obj->setMetadata(mdata);
|
obj->setMetadata(mdata);
|
||||||
|
|
||||||
/* Show instructions and enable controls */
|
/* Show instructions and enable controls */
|
||||||
|
@ -92,8 +92,6 @@ private:
|
|||||||
int position;
|
int position;
|
||||||
|
|
||||||
UAVObject::Metadata initialMdata;
|
UAVObject::Metadata initialMdata;
|
||||||
QString initialUpdateRaw;
|
|
||||||
QString initialUpdateFiltered;
|
|
||||||
|
|
||||||
double listMean(QList<double> list);
|
double listMean(QList<double> list);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user