mirror of
https://github.com/pelgraine/Meck.git
synced 2026-07-29 04:42:41 +02:00
29f60c5bcd
Throttle the ESP32 lazy contact save from a 5s debounce to a 12h interval (CONTACTS_SAVE_INTERVAL). A new _nextContactSaveDue anchors the next flush 12h out on the first dirty pass and only writes once reached, clearing after each save so the next dirty event re-anchors. Cuts the recurring ~95KB LittleFS rewrites on busy meshes. nRF52/STM32 blocking-save path unchanged. Flush contacts (blocking) in the AUTO_SHUTDOWN_MILLIVOLTS path before shutdown() so low-battery power-off doesn't drop up to 12h of contact learning. Manual power-off left untouched. Gate the SHUTDOWN home page out on the watch (MECK_TWATCH): removed from the HomePage enum with render/input/isOnShutdownPage guarded. The AXP2101 PWR-button long-press is the shutdown path there. Files: MyMesh.h, MyMesh.cpp, UITask.cpp