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

GCS-Handle reload operation config camera stab

This commit is contained in:
PT_Dreamer 2012-08-15 00:13:26 +01:00
parent ae962f507b
commit d3c5fcfa7e

View File

@ -217,7 +217,21 @@ void ConfigCameraStabilizationWidget::updateObjectsFromWidgets()
}
void ConfigCameraStabilizationWidget::defaultRequestedSlot(int group)
{
HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
HwSettings *hwSettingsDefault=(HwSettings*)hwSettings->dirtyClone();
HwSettings::DataFields hwSettingsData = hwSettingsDefault->getData();
m_camerastabilization->enableCameraStabilization->setChecked(
hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_CAMERASTAB] == HwSettings::OPTIONALMODULES_ENABLED);
QComboBox *outputs[] = {
m_camerastabilization->rollChannel,
m_camerastabilization->pitchChannel,
m_camerastabilization->yawChannel,
};
const int NUM_OUTPUTS = sizeof(outputs) / sizeof(outputs[0]);
for (int i = 0; i < NUM_OUTPUTS; i++) {
outputs[i]->setCurrentIndex(0);
}
}
/**