diff --git a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp index bf390b175..caf58e694 100644 --- a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp @@ -116,9 +116,11 @@ void ConfigStabilizationWidget::realtimeUpdatesSlot(bool value) ui->realTimeUpdates_8->setChecked(value); if (value && !realtimeUpdates->isActive()) { - realtimeUpdates->start(300); - } else { + realtimeUpdates->start(AUTOMATIC_UPDATE_RATE); + qDebug() << "Instant Update timer started."; + } else if (!value && realtimeUpdates->isActive()) { realtimeUpdates->stop(); + qDebug() << "Instant Update timer stopped."; } } @@ -134,7 +136,7 @@ void ConfigStabilizationWidget::linkCheckBoxes(bool value) ui->checkBox_8->setChecked(value); } else if (sender() == ui->basicResponsivenessGroupBox) { ui->advancedResponsivenessGroupBox->setChecked(!value); - if(value) { + if (value) { processLinkedWidgets(ui->AttitudeResponsivenessSlider); processLinkedWidgets(ui->RateResponsivenessSlider); } @@ -181,7 +183,7 @@ void ConfigStabilizationWidget::processLinkedWidgets(QWidget *widget) } } - if(ui->basicResponsivenessGroupBox->isChecked()) { + if (ui->basicResponsivenessGroupBox->isChecked()) { if (widget == ui->AttitudeResponsivenessSlider) { ui->ratePitchKp_4->setValue(ui->AttitudeResponsivenessSlider->value()); } else if (widget == ui->RateResponsivenessSlider) { diff --git a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h index 8be034790..d728a877b 100644 --- a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h @@ -49,6 +49,9 @@ private: Ui_StabilizationWidget *ui; QTimer * realtimeUpdates; + // Milliseconds between automatic 'Instant Updates' + static const int AUTOMATIC_UPDATE_RATE = 500; + protected slots: void refreshWidgetsValues(UAVObject *o = NULL);