room-server: drive push engine on a timer + cut delivery latency

Two hardware-found fixes after on-air testing on the GAT562 kit:

- Add a 500ms push timer in main_room_server.cpp so the post-sync
  engine advances at its intended cadence. ZephCore is event-driven
  (no Arduino superloop), so without this the engine only ran on the
  5s housekeeping tick — posts dripped out every ~5s and transmits
  bunched up, causing timeouts/resends.

- Lower the post-sync hold from upstream's conservative defaults
  (POST_SYNC_DELAY 6s -> 2s, PUSH_NOTIFY 2000ms -> 1000ms). These are
  server-side timing only (no wire-format change), and take measured
  delivery from ~6-7s down to ~2s.

Verified on hardware (910.525/62.5/SF7/CR8, two clients): normal-pace
messages deliver in ~2s with clean ACKs. Rapid-fire bursts can still
drop out-of-order messages via the per-client timestamp replay check
(unchanged from upstream) — left as-is to stay upstream-compatible.
This commit is contained in:
rlwilliamson-dev
2026-06-02 14:12:08 -05:00
parent bb6d9c60e1
commit 58dbba7f3b
2 changed files with 25 additions and 5 deletions
+5 -3
View File
@@ -86,13 +86,15 @@ static void uplink_time_sync_cb(uint32_t unix_ts)
#define SERVER_RESPONSE_DELAY 300
#define TXT_ACK_DELAY 200
/* Room server: post push/sync timing (matches upstream MeshCore). */
#define PUSH_NOTIFY_DELAY_MILLIS 2000
/* Room server: post push/sync timing. Upstream defaults are conservative
* (PUSH_NOTIFY 2000, POST_SYNC 6) which adds ~6-7s of delivery lag; lowered
* here for a more responsive room without changing wire formats. */
#define PUSH_NOTIFY_DELAY_MILLIS 1000
#define SYNC_PUSH_INTERVAL 1200
#define PUSH_ACK_TIMEOUT_FLOOD 12000
#define PUSH_TIMEOUT_BASE 4000
#define PUSH_ACK_TIMEOUT_FACTOR 2000
#define POST_SYNC_DELAY_SECS 6
#define POST_SYNC_DELAY_SECS 2
/* Stats blob returned for REQ_TYPE_GET_STATUS on a room server. Mirrors the
* repeater's RepeaterStats but reports posted/pushed counts in the trailing