Lots of changes and optimizations

- add reverse encoder menu option and save state
- improve usage of EncoderDir in ISR with pointer to instance and static isr() method.
- reduce u8g2 memory usage by using single page buffer
- improve save state behavor by using a mutex flag and update check with debounce in main loop
- make saving to EEPROM safer by wrapping put calls with noInterrupts()
This commit is contained in:
2025-06-15 19:20:16 -07:00
parent 0cef942f2c
commit 8644a3e752
7 changed files with 124 additions and 61 deletions

View File

@ -29,7 +29,7 @@ class Gravity {
// Polling check for state change of inputs and outputs.
void Process();
U8G2_SSD1306_128X64_NONAME_2_HW_I2C display; // OLED display object.
U8G2_SSD1306_128X64_NONAME_1_HW_I2C display; // OLED display object.
Clock clock; // Clock source wrapper.
DigitalOutput outputs[OUTPUT_COUNT]; // An array containing each Output object.
EncoderDir encoder; // Rotary encoder with button instance