Nice work showing usage of : cppreference.com/w/cpp/types/offsetof
Not used that before - but seemed ordering in a struct could lead to ability of the compiler to resolve offsets without 'messy...
Type: Posts; User: defragster
Nice work showing usage of : cppreference.com/w/cpp/types/offsetof
Not used that before - but seemed ordering in a struct could lead to ability of the compiler to resolve offsets without 'messy...
Like float, an 'int' is 32 bit? To be sure user int32_t. If everything is 4 bytes it will stack okay.
Offhand ... without seeing the whole of the usage needs ... not sure of a neat way that...
Cool - glad issue popped out when I looked. That was just a HACK Test ...
Indeed as noted GET and PUT index and work the same - but the code only showed .put()'s.
Note:: that 'solution' only...
EEPROM indexes are to single BYTES - as indicated in the posted code comment :: appropriate byte of the EEPROM.
.put() and .get() are sizeof() aware and will write the four BYTES of the float...