1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

CC: After attitude calibration always reenable BiasCorrectGyro. Fixes odd bug

if people have it crash in the middle.
This commit is contained in:
James Cotton 2011-10-08 14:15:48 -05:00
parent 0f1a6264de
commit 7da8cb2079
2 changed files with 1 additions and 3 deletions

View File

@ -98,7 +98,7 @@ void ConfigCCAttitudeWidget::attitudeRawUpdated(UAVObject * obj) {
attitudeSettingsData.GyroBias[0] = -x_gyro_bias;
attitudeSettingsData.GyroBias[1] = -y_gyro_bias;
attitudeSettingsData.GyroBias[2] = -z_gyro_bias;
attitudeSettingsData.BiasCorrectGyro = initialBiasCorrected;
attitudeSettingsData.BiasCorrectGyro = AttitudeSettings::BIASCORRECTGYRO_TRUE;
AttitudeSettings::GetInstance(getObjectManager())->setData(attitudeSettingsData);
} else {
@ -134,7 +134,6 @@ void ConfigCCAttitudeWidget::startAccelCalibration() {
// Disable gyro bias correction to see raw data
AttitudeSettings::DataFields attitudeSettingsData = AttitudeSettings::GetInstance(getObjectManager())->getData();
initialBiasCorrected = attitudeSettingsData.BiasCorrectGyro;
attitudeSettingsData.BiasCorrectGyro = AttitudeSettings::BIASCORRECTGYRO_FALSE;
AttitudeSettings::GetInstance(getObjectManager())->setData(attitudeSettingsData);

View File

@ -57,7 +57,6 @@ private:
Ui_ccattitude *ui;
QTimer timer;
UAVObject::Metadata initialMdata;
quint8 initialBiasCorrected;
int updates;