diff --git a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp index 4ad611284..e457979c0 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp +++ b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp @@ -64,10 +64,10 @@ ThermalCalibrationModel::ThermalCalibrationModel(QObject *parent) : connect(m_helper.data(), SIGNAL(temperatureGradientChanged(float)), this, SLOT(setTemperatureGradient(float))); connect(m_helper.data(), SIGNAL(progressChanged(int)), this, SLOT(setProgress(int))); connect(m_helper.data(), SIGNAL(instructionsAdded(QString, WizardModel::MessageType)), this, SLOT(addInstructions(QString, WizardModel::MessageType))); - connect(m_readyState, SIGNAL(entered()), this, SLOT(wizardReady())); - connect(m_readyState, SIGNAL(exited()), this, SLOT(wizardStarted())); - connect(m_completedState, SIGNAL(entered()), this, SLOT(wizardReady())); - connect(m_completedState, SIGNAL(exited()), this, SLOT(wizardStarted())); + connect(m_readyState, SIGNAL(entered()), this, SLOT(stopWizard())); + connect(m_readyState, SIGNAL(exited()), this, SLOT(startWizard())); + connect(m_completedState, SIGNAL(entered()), this, SLOT(stopWizard())); + connect(m_completedState, SIGNAL(exited()), this, SLOT(startWizard())); setInitialState(m_readyState); @@ -81,9 +81,9 @@ void ThermalCalibrationModel::init() setStartEnabled(true); setEndEnabled(false); setCancelEnabled(false); - start(); setTemperature(0); setTemperatureGradient(0); + start(); } } diff --git a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.h b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.h index ab5f7af5a..1d2228d85 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.h +++ b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.h @@ -165,8 +165,8 @@ signals: void endEnabledChanged(bool state); void cancelEnabledChanged(bool state); - void started(); - void stopped(); + void wizardStarted(); + void wizardStopped(); void temperatureChanged(float temp); void temperatureGradientChanged(float tempGradient); @@ -195,21 +195,22 @@ public slots: { emit abort(); } - void wizardReady() + void startWizard() + { + setStartEnabled(false); + setEndEnabled(true); + setCancelEnabled(true); + wizardStarted(); + } + void stopWizard() { setStartEnabled(true); setEndEnabled(false); setCancelEnabled(false); - stopped(); - } - void wizardStarted() - { - started(); - setStartEnabled(false); - setEndEnabled(true); - setCancelEnabled(true); + wizardStopped(); } }; + } #endif // THERMALCALIBRATIONMODEL_H diff --git a/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp b/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp index 8fb019cd4..c686a1e70 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp @@ -106,8 +106,8 @@ ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) : connect(m_thermalCalibrationModel, SIGNAL(startEnabledChanged(bool)), m_ui->ThermalBiasStart, SLOT(setEnabled(bool))); connect(m_thermalCalibrationModel, SIGNAL(endEnabledChanged(bool)), m_ui->ThermalBiasEnd, SLOT(setEnabled(bool))); connect(m_thermalCalibrationModel, SIGNAL(cancelEnabledChanged(bool)), m_ui->ThermalBiasCancel, SLOT(setEnabled(bool))); - connect(m_thermalCalibrationModel, SIGNAL(started()), this, SLOT(disableAllCalibrations())); - connect(m_thermalCalibrationModel, SIGNAL(stopped()), this, SLOT(enableAllCalibrations())); + connect(m_thermalCalibrationModel, SIGNAL(wizardStarted()), this, SLOT(disableAllCalibrations())); + connect(m_thermalCalibrationModel, SIGNAL(wizardStopped()), this, SLOT(enableAllCalibrations())); connect(m_thermalCalibrationModel, SIGNAL(instructionsAdded(QString, WizardModel::MessageType)), this, SLOT(addInstructions(QString, WizardModel::MessageType)));