chore(radio): remove EEPROM macros and related code (#5461)
This commit is contained in:
+3
-42
@@ -71,9 +71,7 @@
|
||||
RadioData g_eeGeneral;
|
||||
ModelData g_model;
|
||||
|
||||
#if defined(SDCARD)
|
||||
Clipboard clipboard;
|
||||
#endif
|
||||
|
||||
GlobalData globalData;
|
||||
|
||||
@@ -655,10 +653,6 @@ static void checkFailsafe()
|
||||
#if defined(GUI)
|
||||
void checkAll(bool isBootCheck)
|
||||
{
|
||||
#if defined(EEPROM_RLC) && !defined(SDCARD_RAW) && !defined(SDCARD_YAML)
|
||||
checkLowEEPROM();
|
||||
#endif
|
||||
|
||||
checkSDfreeStorage();
|
||||
|
||||
// we don't check the throttle stick if the radio is not calibrated
|
||||
@@ -735,17 +729,6 @@ void checkAll(bool isBootCheck)
|
||||
}
|
||||
#endif // GUI
|
||||
|
||||
|
||||
#if defined(EEPROM_RLC) && !defined(SDCARD_RAW) && !defined(SDCARD_YAML)
|
||||
void checkLowEEPROM()
|
||||
{
|
||||
if (g_eeGeneral.disableMemoryWarning) return;
|
||||
if (EeFsGetFree() < 100) {
|
||||
ALERT(STR_STORAGE_WARNING, STR_EEPROMLOWMEM, AU_ERROR);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool isThrottleWarningAlertNeeded()
|
||||
{
|
||||
if (g_model.disableThrottleWarning) {
|
||||
@@ -1097,9 +1080,7 @@ void edgeTxClose(uint8_t shutdown)
|
||||
luaClose(&lsScripts);
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD)
|
||||
logsClose();
|
||||
#endif
|
||||
|
||||
storageFlushCurrentModel();
|
||||
|
||||
@@ -1127,9 +1108,7 @@ void edgeTxClose(uint8_t shutdown)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD)
|
||||
sdDone();
|
||||
#endif
|
||||
}
|
||||
|
||||
void edgeTxResume()
|
||||
@@ -1387,14 +1366,13 @@ void edgeTxInit()
|
||||
#endif
|
||||
|
||||
// Load radio.yml so radio settings can be used
|
||||
bool radioSettingsValid = false;
|
||||
#if defined(RTC_BACKUP_RAM)
|
||||
// Skip loading if EM startup and radio has RTC backup data
|
||||
if (!UNEXPECTED_SHUTDOWN())
|
||||
radioSettingsValid = storageReadRadioSettings(false);
|
||||
storageReadRadioSettings(false);
|
||||
#else
|
||||
// No RTC backup - try and load even for EM startup
|
||||
radioSettingsValid = storageReadRadioSettings(false);
|
||||
storageReadRadioSettings(false);
|
||||
#endif
|
||||
|
||||
#if defined(GUI) && !defined(COLORLCD)
|
||||
@@ -1419,7 +1397,6 @@ void edgeTxInit()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD)
|
||||
// SDCARD related stuff, only enable if normal boot
|
||||
if (!UNEXPECTED_SHUTDOWN()) {
|
||||
|
||||
@@ -1450,16 +1427,6 @@ void edgeTxInit()
|
||||
|
||||
logsInit();
|
||||
}
|
||||
#endif // defined(SDCARD)
|
||||
|
||||
#if defined(EEPROM)
|
||||
if (!radioSettingsValid) {
|
||||
storageReadRadioSettings();
|
||||
}
|
||||
storageReadCurrentModel();
|
||||
#else
|
||||
(void)radioSettingsValid;
|
||||
#endif
|
||||
|
||||
#if defined(COLORLCD) && defined(LUA)
|
||||
if (!UNEXPECTED_SHUTDOWN()) {
|
||||
@@ -1468,8 +1435,7 @@ void edgeTxInit()
|
||||
}
|
||||
#endif
|
||||
|
||||
// handling of storage for radios that have no EEPROM
|
||||
#if !defined(EEPROM)
|
||||
// handling of storage for radios
|
||||
#if defined(RTC_BACKUP_RAM) && !defined(SIMU)
|
||||
if (UNEXPECTED_SHUTDOWN()) {
|
||||
// SDCARD not available, try to restore last model from RAM
|
||||
@@ -1483,7 +1449,6 @@ void edgeTxInit()
|
||||
#else
|
||||
storageReadAll();
|
||||
#endif
|
||||
#endif // #if !defined(EEPROM)
|
||||
|
||||
initSerialPorts();
|
||||
|
||||
@@ -1639,10 +1604,6 @@ int main()
|
||||
runFatalErrorScreen(STR_NO_SDCARD);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(EEPROM) && defined(EEPROM_RLC)
|
||||
eepromInit();
|
||||
#endif
|
||||
|
||||
tasksStart();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user