fix(bw): changing some model and radio settings does not update corresponding yaml file (#6111)
This commit is contained in:
@@ -690,6 +690,7 @@ void menuModelCFSOne(event_t event)
|
|||||||
if (config == SWITCH_TOGGLE) {
|
if (config == SWITCH_TOGGLE) {
|
||||||
FSWITCH_SET_STARTUP(cfsIndex, FS_START_PREVIOUS); // Toggle switches do not have startup position
|
FSWITCH_SET_STARTUP(cfsIndex, FS_START_PREVIOUS); // Toggle switches do not have startup position
|
||||||
}
|
}
|
||||||
|
storageDirty(EE_MODEL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -709,6 +710,7 @@ void menuModelCFSOne(event_t event)
|
|||||||
FSWITCH_SET_STARTUP(cfsIndex, FS_START_PREVIOUS);
|
FSWITCH_SET_STARTUP(cfsIndex, FS_START_PREVIOUS);
|
||||||
}
|
}
|
||||||
setGroupSwitchState(oldGroup);
|
setGroupSwitchState(oldGroup);
|
||||||
|
storageDirty(EE_MODEL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -718,6 +720,7 @@ void menuModelCFSOne(event_t event)
|
|||||||
if (attr) {
|
if (attr) {
|
||||||
startPos = checkIncDec(event, startPos, FS_START_ON, FS_START_PREVIOUS, EE_MODEL);
|
startPos = checkIncDec(event, startPos, FS_START_ON, FS_START_PREVIOUS, EE_MODEL);
|
||||||
FSWITCH_SET_STARTUP(cfsIndex, startPos);
|
FSWITCH_SET_STARTUP(cfsIndex, startPos);
|
||||||
|
storageDirty(EE_MODEL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ void pushMenu(MenuHandlerFunc newMenu)
|
|||||||
killAllEvents();
|
killAllEvents();
|
||||||
|
|
||||||
if (menuLevel == 0) {
|
if (menuLevel == 0) {
|
||||||
if (newMenu == menuRadioSetup)
|
if (newMenu == menuTabGeneral[0].menuFunc)
|
||||||
menuVerticalPositions[0] = 1;
|
menuVerticalPositions[0] = 1;
|
||||||
if (newMenu == menuModelSelect)
|
if (newMenu == menuModelSelect)
|
||||||
menuVerticalPositions[0] = 0;
|
menuVerticalPositions[0] = 0;
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ void menuRadioHardware(event_t event)
|
|||||||
flags = menuHorizontalPosition == 2 ? attr : 0;
|
flags = menuHorizontalPosition == 2 ? attr : 0;
|
||||||
bool potinversion = getPotInversion(idx);
|
bool potinversion = getPotInversion(idx);
|
||||||
lcdDrawChar(LCD_W - 8, y, potinversion ? 127 : 126, flags);
|
lcdDrawChar(LCD_W - 8, y, potinversion ? 127 : 126, flags);
|
||||||
if (flags & (~RIGHT)) potinversion = checkIncDec(event, potinversion, 0, 1, (isModelMenuDisplayed()) ? EE_MODEL : EE_GENERAL);
|
if (flags & (~RIGHT)) potinversion = checkIncDec(event, potinversion, 0, 1, EE_GENERAL);
|
||||||
setPotInversion(idx, potinversion);
|
setPotInversion(idx, potinversion);
|
||||||
} else if (getPotInversion(idx)) {
|
} else if (getPotInversion(idx)) {
|
||||||
setPotInversion(idx, 0);
|
setPotInversion(idx, 0);
|
||||||
@@ -537,7 +537,7 @@ void menuRadioHardware(event_t event)
|
|||||||
flags = menuHorizontalPosition == 0 ? attr : 0;
|
flags = menuHorizontalPosition == 0 ? attr : 0;
|
||||||
auto source = switchGetFlexConfig(index);
|
auto source = switchGetFlexConfig(index);
|
||||||
lcdDrawText(HW_SETTINGS_COLUMN1, y, (source < 0) ? STR_NONE : adcGetInputLabel(ADC_INPUT_FLEX, source), flags);
|
lcdDrawText(HW_SETTINGS_COLUMN1, y, (source < 0) ? STR_NONE : adcGetInputLabel(ADC_INPUT_FLEX, source), flags);
|
||||||
if (flags & (~RIGHT)) source = checkIncDec(event, source, -1, adcGetMaxInputs(ADC_INPUT_FLEX) - 1, (isModelMenuDisplayed()) ? EE_MODEL : EE_GENERAL, isFlexSwitchSourceValid);
|
if (flags & (~RIGHT)) source = checkIncDec(event, source, -1, adcGetMaxInputs(ADC_INPUT_FLEX) - 1, EE_GENERAL, isFlexSwitchSourceValid);
|
||||||
switchConfigFlex(index, source);
|
switchConfigFlex(index, source);
|
||||||
|
|
||||||
//Name
|
//Name
|
||||||
@@ -561,6 +561,7 @@ void menuRadioHardware(event_t event)
|
|||||||
g_eeGeneral.switchConfig =
|
g_eeGeneral.switchConfig =
|
||||||
(g_eeGeneral.switchConfig & ~mask) |
|
(g_eeGeneral.switchConfig & ~mask) |
|
||||||
((swconfig_t(config) & SW_CFG_MASK) << (SW_CFG_BITS * index));
|
((swconfig_t(config) & SW_CFG_MASK) << (SW_CFG_BITS * index));
|
||||||
|
storageDirty(EE_GENERAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -584,6 +585,7 @@ void menuRadioHardware(event_t event)
|
|||||||
g_eeGeneral.switchConfig =
|
g_eeGeneral.switchConfig =
|
||||||
(g_eeGeneral.switchConfig & ~mask) |
|
(g_eeGeneral.switchConfig & ~mask) |
|
||||||
((swconfig_t(config) & SW_CFG_MASK) << (SW_CFG_BITS * index));
|
((swconfig_t(config) & SW_CFG_MASK) << (SW_CFG_BITS * index));
|
||||||
|
storageDirty(EE_GENERAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (k <= ITEM_RADIO_HARDWARE_SERIAL_PORT_END) {
|
} else if (k <= ITEM_RADIO_HARDWARE_SERIAL_PORT_END) {
|
||||||
|
|||||||
Reference in New Issue
Block a user