From 45e21acefdec56571bc57c6779c15f86b5588c0a Mon Sep 17 00:00:00 2001 From: PT_Dreamer Date: Sun, 19 Aug 2012 14:41:09 +0100 Subject: [PATCH] GCS- Get rid of the double hwsettings update. setData triggers an update so the other functions should be used instead. MixerSettings should be refactored next. --- .../src/plugins/config/configcamerastabilizationwidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configcamerastabilizationwidget.cpp b/ground/openpilotgcs/src/plugins/config/configcamerastabilizationwidget.cpp index e7d60f018..9c4470a1d 100644 --- a/ground/openpilotgcs/src/plugins/config/configcamerastabilizationwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configcamerastabilizationwidget.cpp @@ -153,11 +153,9 @@ void ConfigCameraStabilizationWidget::updateObjectsFromWidgets() { // Save state of the module enable checkbox first HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager()); - HwSettings::DataFields hwSettingsData = hwSettings->getData(); - hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_CAMERASTAB] = - m_camerastabilization->enableCameraStabilization->isChecked() ? + quint8 value = m_camerastabilization->enableCameraStabilization->isChecked() ? HwSettings::OPTIONALMODULES_ENABLED : HwSettings::OPTIONALMODULES_DISABLED; - hwSettings->setData(hwSettingsData); + hwSettings->setOptionalModules(HwSettings::OPTIONALMODULES_CAMERASTAB,value); // Update mixer channels which were mapped to camera outputs in case they are // not used for other function yet