mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-05 22:04:33 -05:00
* OSThread: keep a due time set during a run run() calls runned() after runOnce(), which re-bases the next run on the end of the run. A notifyLater()/setIntervalFromNow() made inside runOnce() was delayed by whatever the run did afterwards. Keep that due time when runOnce() returns RUN_SAME; an explicit return value or a later setInterval() still wins. Co-Authored-By: Jonathan Bennett <jbennett@incomsystems.biz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REkPVFh6kvG4AZJ5A8AtM9 * OSThread: skip runned() instead of restoring the due time Restoring the saved due time after runned() could overwrite a setInterval(0) from an ISR that landed between the check and the store. Not calling runned() in that case leaves _cached_next_run unwritten, so the ISR's wakeup stands. Co-Authored-By: Jonathan Bennett <jbennett@incomsystems.biz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REkPVFh6kvG4AZJ5A8AtM9 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>