Fix X9E switches ((some cannot be configured or read)

This commit is contained in:
3djc
2019-06-18 16:58:06 +02:00
parent 0ec02f096c
commit 4998191910
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -204,8 +204,7 @@ void menuRadioHardware(event_t event)
lcdDrawMMM(HW_SETTINGS_COLUMN, y, menuHorizontalPosition == 0 ? attr : 0);
config = editChoice(HW_SETTINGS_COLUMN+5*FW, y, "", STR_SWTYPES, config, SWITCH_NONE, SWITCH_TYPE_MAX(index), menuHorizontalPosition == 1 ? attr : 0, event);
if (attr && checkIncDec_Ret) {
swconfig_t mask = (swconfig_t)0x03 << (2*index);
g_eeGeneral.switchConfig = (g_eeGeneral.switchConfig & ~mask) | ((swconfig_t(config) & 0x03) << (2*index));
g_eeGeneral.switchConfig = bfSet<swconfig_t >(g_eeGeneral.switchConfig, config, 2*index, 2);
}
break;
}