[all] Sticks calibration launched automatically when needed

[Taranis] Curves again!
[Taranis] Trainer menu
This commit is contained in:
bsongis@gmail.com
2013-04-24 19:33:56 +00:00
parent f565f3c893
commit 0e824f8e8a
10 changed files with 223 additions and 201 deletions
+8 -10
View File
@@ -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;
}
}