1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

[All] All FourCC changed (o9x changed to otx) (#4214)

This commit is contained in:
Bertrand Songis 2017-01-09 22:30:01 +01:00 committed by GitHub
parent 58382d8aca
commit f2b283c585
4 changed files with 15 additions and 8 deletions

View file

@ -40,7 +40,7 @@ const char * writeFile(const char * filename, const uint8_t * data, uint16_t siz
return SDCARD_ERROR(result);
}
*(uint32_t*)&buf[0] = O9X_FOURCC;
*(uint32_t*)&buf[0] = OTX_FOURCC;
buf[4] = EEPROM_VER;
buf[5] = 'M';
*(uint16_t*)&buf[6] = size;
@ -93,7 +93,7 @@ const char * loadFile(const char * filename, uint8_t * data, uint16_t maxsize)
}
uint8_t version = (uint8_t)buf[4];
if (*(uint32_t*)&buf[0] != O9X_FOURCC || version < FIRST_CONV_EEPROM_VER || version > EEPROM_VER || buf[5] != 'M') {
if ((*(uint32_t*)&buf[0] != OTX_FOURCC && *(uint32_t*)&buf[0] != O9X_FOURCC) || version < FIRST_CONV_EEPROM_VER || version > EEPROM_VER || buf[5] != 'M') {
f_close(&file);
return STR_INCOMPATIBLE;
}