From bf124257e8b433a86e15f8e6976ef9571a15da7e Mon Sep 17 00:00:00 2001 From: John Poole Date: Wed, 3 Jun 2026 17:52:00 -0700 Subject: [PATCH] LINK STALE clearing logic will not fire until 12 hours of stale activity by the current app-level rules. I also updated README.md (line 18) to document the 12-hour threshold. --- exercises/205_sustained_link/README.md | 2 +- exercises/205_sustained_link/src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/205_sustained_link/README.md b/exercises/205_sustained_link/README.md index 6d25715..5d0f796 100644 --- a/exercises/205_sustained_link/README.md +++ b/exercises/205_sustained_link/README.md @@ -15,7 +15,7 @@ repeat announce: ANNOUNCEMENT_REPEAT seconds after that, default 3600 There is no simulated BOB/CY physical block in this exercise. `SIM_PHY_ENVELOPE` remains enabled so log records can report the physical sender slot, but `SIM_PHY_BLOCK_BOB_CY=0` for every environment. -Exercise 205 does not intentionally tear down Links after a message count. A Link is reused while it remains active. If a Link becomes stale or closes, the unit clears local state and attempts to recreate the outbound Link. +Exercise 205 does not intentionally tear down Links after a message count. A Link is reused while it remains active. The app-level stale threshold is 12 hours. If a Link becomes stale or closes, the unit clears local state and attempts to recreate the outbound Link. Each unit sends one Link message per active peer per minute at its allocated second: diff --git a/exercises/205_sustained_link/src/main.cpp b/exercises/205_sustained_link/src/main.cpp index e5d03a5..ef667e9 100644 --- a/exercises/205_sustained_link/src/main.cpp +++ b/exercises/205_sustained_link/src/main.cpp @@ -62,7 +62,7 @@ static constexpr uint32_t GPS_STATUS_PERIOD_MS = 2000; static constexpr uint32_t PPS_WAIT_MS = 1500; static constexpr uint32_t LINK_RETRY_MS = 60000; static constexpr uint32_t LINK_RETRY_WINDOW_MS = 180000; -static constexpr uint32_t LINK_RX_STALE_MS = 75000; +static constexpr uint32_t LINK_RX_STALE_MS = 12UL * 60UL * 60UL * 1000UL; static constexpr uint32_t LINK_REOPEN_DELAY_MS = 5000; static constexpr uint8_t LINK_MAX_ATTEMPTS_PER_WINDOW = 3; static constexpr uint32_t ANNOUNCEMENT_2_MS = (uint32_t)ANNOUNCEMENT_2 * 1000UL;