From af9f0599dd8ebef79c6ca3c00995f80138662770 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Mon, 29 Aug 2016 22:56:59 +0200 Subject: [PATCH] LP-392 Attitude tab : initGyroWhenBoardSteady and zeroGyroBiasOnArming to Revo --- ground/gcs/src/plugins/config/ccattitude.ui | 29 +- .../plugins/config/configccattitudewidget.cpp | 3 + .../src/plugins/config/configrevowidget.cpp | 3 + ground/gcs/src/plugins/config/revosensors.ui | 531 ++++++++++-------- 4 files changed, 320 insertions(+), 246 deletions(-) diff --git a/ground/gcs/src/plugins/config/ccattitude.ui b/ground/gcs/src/plugins/config/ccattitude.ui index e85f439f2..8f0209957 100644 --- a/ground/gcs/src/plugins/config/ccattitude.ui +++ b/ground/gcs/src/plugins/config/ccattitude.ui @@ -366,6 +366,33 @@ font:bold; + + + + + + If enabled, this option prevent gyro initialisation while the board is moving. + + + Wait the board is steady + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + @@ -376,7 +403,7 @@ whenever the frame is armed. Do not move the airframe while arming it in that case! - Zero gyros while arming aircraft + Zero gyros while arming diff --git a/ground/gcs/src/plugins/config/configccattitudewidget.cpp b/ground/gcs/src/plugins/config/configccattitudewidget.cpp index 2934b8b00..9cc44e9c1 100644 --- a/ground/gcs/src/plugins/config/configccattitudewidget.cpp +++ b/ground/gcs/src/plugins/config/configccattitudewidget.cpp @@ -66,6 +66,8 @@ ConfigCCAttitudeWidget::ConfigCCAttitudeWidget(QWidget *parent) : connect(ui->ccAttitudeHelp, SIGNAL(clicked()), this, SLOT(openHelp())); addWidgetBinding("AttitudeSettings", "ZeroDuringArming", ui->zeroGyroBiasOnArming); + addWidgetBinding("AttitudeSettings", "InitialZeroWhenBoardSteady", ui->initGyroWhenBoardSteady); + addWidgetBinding("AttitudeSettings", "AccelTau", ui->accelTauSpinbox); addWidgetBinding("AttitudeSettings", "BoardRotation", ui->rollBias, AttitudeSettings::BOARDROTATION_ROLL); @@ -234,6 +236,7 @@ void ConfigCCAttitudeWidget::enableControls(bool enable) { ui->zeroBias->setEnabled(enable); ui->zeroGyroBiasOnArming->setEnabled(enable); + ui->initGyroWhenBoardSteady->setEnabled(enable); ui->accelTauSpinbox->setEnabled(enable); ConfigTaskWidget::enableControls(enable); } diff --git a/ground/gcs/src/plugins/config/configrevowidget.cpp b/ground/gcs/src/plugins/config/configrevowidget.cpp index cb85a6fc3..1fcf38c68 100644 --- a/ground/gcs/src/plugins/config/configrevowidget.cpp +++ b/ground/gcs/src/plugins/config/configrevowidget.cpp @@ -197,6 +197,9 @@ ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) : addWidgetBinding("AttitudeSettings", "BoardRotation", m_ui->yawRotation, AttitudeSettings::BOARDROTATION_YAW); addWidgetBinding("AttitudeSettings", "AccelTau", m_ui->accelTau); + addWidgetBinding("AttitudeSettings", "ZeroDuringArming", m_ui->zeroGyroBiasOnArming); + addWidgetBinding("AttitudeSettings", "InitialZeroWhenBoardSteady", m_ui->initGyroWhenBoardSteady); + addWidgetBinding("AuxMagSettings", "Usage", m_ui->auxMagUsage, 0, 1, true); addWidgetBinding("AuxMagSettings", "Type", m_ui->auxMagType, 0, 1, true); diff --git a/ground/gcs/src/plugins/config/revosensors.ui b/ground/gcs/src/plugins/config/revosensors.ui index 10d153907..a3c6d9d0d 100644 --- a/ground/gcs/src/plugins/config/revosensors.ui +++ b/ground/gcs/src/plugins/config/revosensors.ui @@ -487,251 +487,6 @@ p, li { white-space: pre-wrap; } 6 - - - - Rotate virtual attitude relative to board - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - -180.000000000000000 - - - 180.000000000000000 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 70 - 0 - - - - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; -font:bold; - - - Roll - - - Qt::AlignCenter - - - - - - - - 70 - 0 - - - - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; -font:bold; - - - Yaw - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - -180.000000000000000 - - - 180.000000000000000 - - - - - - - - 70 - 0 - - - - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; -font:bold; - - - Pitch - - - Qt::AlignCenter - - - - - - - -180.000000000000000 - - - 180.000000000000000 - - - - - - - - - - Filtering - - - - - - - - - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; -font:bold; - - - Accelerometers - - - Qt::AlignCenter - - - - - - - Accelerometer filtering. - -Sets the amount of lowpass filtering of accelerometer data -for the attitude estimation. Higher values apply a stronger -filter, which may help with drifting in attitude mode. - -Range: 0.00 - 0.20, Good starting value: 0.05 - 0.10 -Start low and raise until drift stops. - -A setting of 0.00 disables the filter. - - - 2.000000000000000 - - - 0.010000000000000 - - - - - - - - - - - 0 - 0 - - - - Attitude Estimation Algorithm - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - 0 - 0 - - - - Selects the sensor integration algorithm to be used by the Revolution board. - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - @@ -930,6 +685,292 @@ A setting of 0.00 disables the filter. + + + + Rotate virtual attitude relative to board + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + -180.000000000000000 + + + 180.000000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 70 + 0 + + + + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; +font:bold; + + + Roll + + + Qt::AlignCenter + + + + + + + + 70 + 0 + + + + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; +font:bold; + + + Yaw + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + -180.000000000000000 + + + 180.000000000000000 + + + + + + + + 70 + 0 + + + + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; +font:bold; + + + Pitch + + + Qt::AlignCenter + + + + + + + -180.000000000000000 + + + 180.000000000000000 + + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Attitude Estimation Algorithm + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + 0 + 0 + + + + Selects the sensor integration algorithm to be used by the Revolution board. + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 40 + + + + + + + + + + + Gyro Initialization + + + + + + If enabled, a fast recalibration of gyro zero point will be done +whenever the frame is armed. Do not move the airframe while +arming it in that case! + + + Zero gyros while arming + + + + + + + If enabled, this option prevent gyro initialisation while the board is moving. + + + Wait the board is steady + + + + + + + + + + + + Filtering + + + + + + + + + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; +font:bold; + + + Accelerometers + + + Qt::AlignCenter + + + + + + + Accelerometer filtering. + +Sets the amount of lowpass filtering of accelerometer data +for the attitude estimation. Higher values apply a stronger +filter, which may help with drifting in attitude mode. + +Range: 0.00 - 0.20, Good starting value: 0.05 - 0.10 +Start low and raise until drift stops. + +A setting of 0.00 disables the filter. + + + 2.000000000000000 + + + 0.010000000000000 + + + + + +