1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-24 00:35:14 +03:00
This commit is contained in:
Grieb 2015-09-16 22:12:55 -03:00
parent 6d52039266
commit 646cc937ac
3 changed files with 13 additions and 17 deletions

View file

@ -1677,6 +1677,7 @@ void ShowEepromWarnings(QWidget *parent, const QString &title, unsigned long err
std::bitset<NUM_ERRORS> errors(errorsFound);
QStringList warningsList;
if (errors.test(WARNING_WRONG_FIRMWARE)) { warningsList << QT_TRANSLATE_NOOP("EepromInterface", "- Your radio probably uses a wrong firmware,\n eeprom size is 4096 but only the first 2048 are used"); }
if (errors.test(OLD_VERSION)) { warningsList << QT_TRANSLATE_NOOP("EepromInterface", "- Your eeprom is from an old version of OpenTX, upgrading!\n You should 'save as' to keep the old file as a backup."); }
QMessageBox msgBox(parent);
msgBox.setWindowTitle(title);

View file

@ -1498,6 +1498,7 @@ enum EepromLoadErrors {
BACKUP_NOT_SUPPORTED,
HAS_WARNINGS,
OLD_VERSION,
WARNING_WRONG_FIRMWARE,
NUM_ERRORS

View file

@ -363,7 +363,10 @@ unsigned long OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *e
std::cout << " version " << (unsigned int)version;
EepromLoadErrors version_error = checkVersion(version);
if (version_error != NO_ERROR) {
if (version_error == OLD_VERSION) {
errors.set(version_error);
errors.set(HAS_WARNINGS);
} else if (version_error == NOT_OPENTX) {
std::cout << " not open9x\n";
errors.set(version_error);
return errors.to_ulong();
@ -908,59 +911,46 @@ EepromLoadErrors OpenTxEepromInterface::checkVersion(unsigned int version)
switch(version) {
case 201:
// first version
break;
case 202:
// channel order is now always RUD - ELE - THR - AIL
// changes in timers
// ppmFrameLength added
// thrTraceSrc added
break;
case 203:
// mixers changed (for the trims use for change the offset of a mix)
// telemetry offset raised to -127 +127
// function switches now have a param on 4 bits
break;
case 204:
// telemetry changes (bars)
break;
case 205:
// mixer changes (differential, negative curves)...
break;
// case 206:
case 207:
// V4: Rotary Encoders position in FlightModes
break;
case 208:
// Trim value in 16bits
// FrSky A1/A2 offset on 12bits
// ARM: More Mixers / Expos / CSW / FSW / CHNOUT
break;
case 209:
// Add TrmR, TrmE, TrmT, TrmA as Mix sources
// Trims are now OFF / ON / Rud / Ele / Thr / Ail
break;
case 210:
// Add names in Mixes / Expos
// Add a new telemetry screen
// Add support for Play Track <filename>
break;
case 211:
// Curves big change
break;
case 212:
// Big changes in mixers / limitse
break;
case 213:
// GVARS / Variants introduction
break;
case 214:
// Massive EEPROM change!
break;
case 215:
// M128 revert because too much RAM used!
break;
case 216:
// A lot of things (first github release)
return OLD_VERSION;
break;
case 217:
// 3 logical switches removed on M128 / gruvin9x boards
@ -1047,9 +1037,13 @@ unsigned long OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *e
std::cout << " version " << (unsigned int)version << " ";
if (!checkVersion(version)) {
EepromLoadErrors version_error = checkVersion(version);
if (version_error == OLD_VERSION) {
errors.set(version_error);
errors.set(HAS_WARNINGS);
} else if (version_error == NOT_OPENTX) {
std::cout << " not open9x\n";
errors.set(NOT_OPENTX);
errors.set(version_error);
return errors.to_ulong();
}