I have been following the example posted here
I am using Multiple Inheritance on an object i call Save. The following is an example of how it is structured
class Save {
int a;
int b;
//some methods
};
class SaveA :public virtual Save {
int c;
int d;
//some methods
};
class SaveB :public virtual Save {
enum class X:int{TYPE1,TYPE2};
X settings1;
X settings2;
//some methods
};
class SaveAB :public SaveA, public SaveB {
int y;
int z;
//some methods
};
I have verified that EEPROM.put and EEPROM.get save the data members just fine but i am a bit unsure about how to make sure the data is valid upon reset.
In the topic i linked above the checksums were done inside structs and some padding was used at the end of the data members. What would be a recommended way of checking for data validity in the above example?