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

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.
This commit is contained in:
PT_Dreamer 2012-08-19 14:41:09 +01:00
parent 0afd923708
commit 45e21acefd

View File

@ -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