Add global/hardware settings to metadata EEPROM (#15)
Settings like Encoder Direction and Display Orientation should persist when resetting channel state. Fixes https://github.com/awonak/alt-gravity/issues/7 Reviewed-on: https://git.pinkduck.xyz/awonak/libGravity/pulls/15
This commit is contained in:
@ -59,6 +59,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;
|
||||
@ -85,7 +87,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