MeshCore/examples/simple_repeater
Wessel Nieboer 5f36fde054
Allow setting RTC clock backwards and fix elapsed-time underflow
Remove the "clock cannot go backwards" restriction from all set-time
paths (CLI `time`, `clock sync`, companion radio CMD_SET_DEVICE_TIME,
and simple_secure_chat). The ESP32-S3 RTC drifts 5-10% during deep
sleep, making backwards correction necessary after even a few days.

Add safeElapsedSecs() helper in ArduinoHelpers.h that clamps elapsed
time to 0 when a stored timestamp appears to be in the future after a
clock correction. Applied to:
- Neighbor "heard X ago" displays in simple_repeater
- UI time displays in companion_radio
- TimeSeriesData calculations in simple_sensor

Switch BaseChatMesh connection expiry from RTC timestamps to monotonic
millis(), making it immune to RTC adjustments from GPS, NTP, or manual
sync. Rename last_activity to last_activity_ms to reflect the change.
2026-04-04 13:19:21 +02:00
..
main.cpp sensecap solar: stabilize wake pin and add button hold poweroff 2026-02-27 22:51:19 -05:00
MyMesh.cpp Allow setting RTC clock backwards and fix elapsed-time underflow 2026-04-04 13:19:21 +02:00
MyMesh.h Make sendNodeDiscoverReq() public for post-boot discovery 2026-03-30 22:35:05 +03:00
RateLimiter.h * repeater: onAnonDataRecv(), now rejecting non-ASCII password (preparing for future request codes) 2025-11-06 20:15:01 +11:00
UITask.cpp Implement getTextWidth for display classes 2025-05-04 18:17:18 -07:00
UITask.h UI: battery indicator, boot screen, radio settings 2025-04-20 19:17:02 -07:00