Add global/hardware settings to metadata EEPROM
This commit is contained in:
@ -20,7 +20,7 @@ struct AppState;
|
||||
|
||||
// Define the constants for the current firmware.
|
||||
const char SKETCH_NAME[] = "Gravity";
|
||||
const byte SKETCH_VERSION = 7;
|
||||
const byte SKETCH_VERSION = 8;
|
||||
|
||||
// Number of available save slots.
|
||||
const byte MAX_SAVE_SLOTS = 10;
|
||||
@ -57,6 +57,8 @@ class StateManager {
|
||||
struct Metadata {
|
||||
byte version;
|
||||
char sketch_name[16];
|
||||
// Additional global/hardware settings
|
||||
bool encoder_reversed;
|
||||
};
|
||||
struct ChannelState {
|
||||
byte base_clock_mod_index;
|
||||
@ -83,7 +85,8 @@ class StateManager {
|
||||
|
||||
private:
|
||||
bool _isDataValid();
|
||||
void _saveMetadata();
|
||||
void _saveMetadata(const AppState& app);
|
||||
void _loadMetadata(AppState& app);
|
||||
void _saveState(const AppState& app, byte slot_index);
|
||||
void _loadState(AppState& app, byte slot_index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user