[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:
committed by
Bertrand Songis
parent
56dc2f94ce
commit
d29c381c19
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user