Introduce StateManager to persist state between power cycles #6

Merged
awonak merged 5 commits from refs/pull/6/head into main 2025-06-16 02:47:25 +00:00
10 changed files with 376 additions and 105 deletions
Showing only changes of commit d62e37e033 - Show all commits

View File

@ -58,7 +58,6 @@ class StateManager {
bool _isDirty;
unsigned long _lastChangeTime;
static const unsigned long SAVE_DELAY_MS = 2000;
};
#endif // SAVE_STATE_H

View File

@ -11,7 +11,8 @@
#include "gravity.h"
// Initialize the static pointer for the EncoderDir class to null.
// Initialize the static pointer for the EncoderDir class to null. We want to
// have a static pointer to decouple the ISR from the global gravity object.
EncoderDir* EncoderDir::_instance = nullptr;
void Gravity::Init() {