[all] Sticks calibration launched automatically when needed
[Taranis] Curves again! [Taranis] Trainer menu
This commit is contained in:
+8
-10
@@ -857,21 +857,19 @@ void RlcFile::DisplayProgressBar(uint8_t x)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD)
|
||||
#define CHECK_EEPROM_VARIANT() (g_eeGeneral.variant == EEPROM_VARIANT)
|
||||
#else
|
||||
#define CHECK_EEPROM_VARIANT() (1)
|
||||
#endif
|
||||
|
||||
bool eeLoadGeneral()
|
||||
{
|
||||
theFile.openRlc(FILE_GENERAL);
|
||||
if (theFile.readRlc((uint8_t*)&g_eeGeneral, 1) == 1 && g_eeGeneral.version == EEPROM_VER) {
|
||||
theFile.openRlc(FILE_GENERAL);
|
||||
if (theFile.readRlc((uint8_t*)&g_eeGeneral, sizeof(g_eeGeneral)) <= sizeof(EEGeneral)) {
|
||||
#if defined(PCBSTD)
|
||||
if (g_eeGeneral.variant == EEPROM_VARIANT && g_eeGeneral.chkSum == evalChkSum()) {
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
if (g_eeGeneral.chkSum == evalChkSum()) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (theFile.readRlc((uint8_t*)&g_eeGeneral, sizeof(g_eeGeneral)) <= sizeof(EEGeneral) && CHECK_EEPROM_VARIANT()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user