[Companion] Move SwitchType enum to RadioData GeneralSettings (#4249)

* [Companion] Move SwitchType enum to RadioData GeneralSettings for consistency.

* Fix default 9X switch index positions & trainer switch name.
This commit is contained in:
Max Paperno
2017-01-18 07:33:28 +01:00
committed by Bertrand Songis
parent 56dc2f94ce
commit d29c381c19
6 changed files with 145 additions and 144 deletions
+4 -4
View File
@@ -24,11 +24,11 @@
void HardwarePanel::setupSwitchConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type, bool threePos = true)
{
if (IS_STM32(firmware->getBoard()) && index < firmware->getCapability(Switches)) {
type->addItem(tr("None"), Firmware::SWITCH_NONE);
type->addItem(tr("2 Positions Toggle"), Firmware::SWITCH_TOGGLE);
type->addItem(tr("2 Positions"), Firmware::SWITCH_2POS);
type->addItem(tr("None"), GeneralSettings::SWITCH_NONE);
type->addItem(tr("2 Positions Toggle"), GeneralSettings::SWITCH_TOGGLE);
type->addItem(tr("2 Positions"), GeneralSettings::SWITCH_2POS);
if (threePos)
type->addItem(tr("3 Positions"), Firmware::SWITCH_3POS);
type->addItem(tr("3 Positions"), GeneralSettings::SWITCH_3POS);
name->setField(generalSettings.switchName[index], 3, this);
type->setField(generalSettings.switchConfig[index], this);
}