mirror of
https://github.com/Colorado-Mesh/meshcore-bot-firmware.git
synced 2026-08-11 08:10:29 +00:00
bias = hop * step + hop^2 * BOT_HOP_GROW_MILLIS Bumps hop_step 3000->2000, adds BOT_HOP_GROW_MILLIS=400, raises cap 15000->50000 and TTL 75000->95000. Forces re-default of hop_step on existing bots via BOT_PREFS_VERSION 5->6. Gap between adjacent hops now grows with hop count (3200ms at hop 1 all the way to 8000ms at hop 8), so a far bot reliably has time to hear a near bot's reply through the mesh before its own scheduled fire time -- previous linear bias kept the gap constant at 3000ms, which wasn't enough at 6+ hops where reply propagation takes ~5-10s.
28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: cj-vana <cj@depth23.online>
|
|
Date: Sat, 16 May 2026 20:49:51 -0600
|
|
Subject: [PATCH 11/13] Auto-advert on startup (initial flood at 5s instead of
|
|
120s)
|
|
|
|
BOT_PREFS_INITIAL_FLOOD_ADVERT_MILLIS 120000 -> 5000. The bot now sends
|
|
its first flood advert ~5 seconds after boot, so the whole mesh learns
|
|
the bot is up almost immediately. Subsequent flood adverts still
|
|
default to once every 24h via BOT_PREFS_DEFAULT_FLOOD_ADVERT_MILLIS.
|
|
---
|
|
examples/companion_radio/BotTypes.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/examples/companion_radio/BotTypes.h b/examples/companion_radio/BotTypes.h
|
|
index ee3f8984..08fe8bc7 100644
|
|
--- a/examples/companion_radio/BotTypes.h
|
|
+++ b/examples/companion_radio/BotTypes.h
|
|
@@ -41,7 +41,7 @@
|
|
#define BOT_PREFS_DEFAULT_LOCAL_ADVERT_MILLIS (24UL * 60UL * 60UL * 1000UL)
|
|
#define BOT_PREFS_DEFAULT_FLOOD_ADVERT_MILLIS (24UL * 60UL * 60UL * 1000UL)
|
|
#define BOT_PREFS_INITIAL_LOCAL_ADVERT_MILLIS 60000UL
|
|
-#define BOT_PREFS_INITIAL_FLOOD_ADVERT_MILLIS 120000UL
|
|
+#define BOT_PREFS_INITIAL_FLOOD_ADVERT_MILLIS 5000UL
|
|
#define BOT_PREFS_MAX_DELAY_MILLIS 60000U
|
|
#define BOT_PREFS_MAX_ADVERT_MILLIS (7UL * 24UL * 60UL * 60UL * 1000UL)
|
|
#define BOT_PREFS_SERIALIZED_SIZE 296
|