Remove MENUS_LOCK

This commit is contained in:
Raphael Coeffic
2021-12-09 09:11:00 +01:00
parent 54e7caf07e
commit 998af78f19
9 changed files with 5 additions and 68 deletions
+1 -24
View File
@@ -579,20 +579,6 @@ void resetBacklightTimeout()
lightOffCounter = ((uint16_t)g_eeGeneral.lightAutoOff*250) << 1;
}
#if MENUS_LOCK == 1
bool readonly = true;
bool readonlyUnlocked()
{
if (readonly) {
POPUP_WARNING(STR_MODS_FORBIDDEN);
return false;
}
else {
return true;
}
}
#endif
#if defined(SPLASH)
void doSplash()
{
@@ -1750,9 +1736,7 @@ void opentxInit()
#elif defined(GUI)
// TODO add a function for this (duplicated)
menuHandlers[0] = menuMainView;
#if MENUS_LOCK != 2/*no menus*/
menuHandlers[1] = menuModelSelect;
#endif
menuHandlers[1] = menuModelSelect;
#endif
#if defined(EEPROM)
@@ -1857,13 +1841,6 @@ void opentxInit()
aux2SerialInit(g_eeGeneral.aux2SerialMode, modelTelemetryProtocol());
#endif
#if MENUS_LOCK == 1
getMovedSwitch();
if (TRIMS_PRESSED() && g_eeGeneral.switchUnlockStates==switches_states) {
readonly = false;
}
#endif
currentSpeakerVolume = requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
currentBacklightBright = requiredBacklightBright = g_eeGeneral.backlightBright;
#if !defined(SOFTWARE_VOLUME)