From 3e44c52fd83e26391c12926b55a894b8ece442fc Mon Sep 17 00:00:00 2001 From: Adam Wonak Date: Sun, 15 Jun 2025 19:44:42 -0700 Subject: [PATCH] more minor edits --- examples/Gravity/save_state.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Gravity/save_state.h b/examples/Gravity/save_state.h index 23032e2..5ca8823 100644 --- a/examples/Gravity/save_state.h +++ b/examples/Gravity/save_state.h @@ -18,7 +18,9 @@ class StateManager { public: StateManager(); + // Populate the AppState instance with values from EEPROM if they exist. bool initialize(AppState& app); + // Reset AppState instance back to default values. void reset(AppState& app); // Call from main loop, check if state has changed and needs to be saved. void update(const AppState& app); @@ -36,8 +38,8 @@ class StateManager { byte base_probability; byte base_duty_cycle; byte base_offset; - byte cv_source; // We'll store the CvSource enum as a byte - byte cv_destination; // We'll store the CvDestination enum as a byte + byte cv_source; // Cast the CvSource enum to a byte for storage + byte cv_destination; // Cast the CvDestination enum as a byte for storage }; // This struct holds all the parameters we want to save. struct EepromData {