mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
OpenTX custom firmware for Transmitters
Changing the size of a struct by accident lead to random the wrong data from the eeprom and can screw the eeprom up pretty bad. Better bail out if the eeprom size changes and let the developer make that an intentional choice. The template magic is there to print out the actual and expected size: /Users/arne/oss/opentx/radio/src/datastructs.h:1045:3: error: static_assert failed "struct size changed" static_assert(expectedSize == realSize, "struct size changed"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~ /Users/arne/oss/opentx/radio/src/datastructs.h:1181:3: note: in instantiation of function template specialization 'check_size<TrainerData, 168, 16>' requested here CHKSIZE(TrainerData, 168); |
||
---|---|---|
cmake | ||
companion | ||
doc | ||
jenkins | ||
radio | ||
sound | ||
.gitignore | ||
.travis.yml | ||
CMakeLists.txt | ||
compile.bat | ||
CREDITS.txt | ||
DONATIONS.txt | ||
GPLv2.txt | ||
README.md |