simple_repeater: channel bot caps itself at 10 replies per 5 min
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f63ba303c
commit
0243af712e
2 files changed
+34
-1
No files matched your search
@@ -260,6 +260,9 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
||||
#ifndef BOT_PEER_SLOTS
|
||||
#define BOT_PEER_SLOTS 8
|
||||
#endif
|
||||
#ifndef BOT_BURST_MAX
|
||||
#define BOT_BURST_MAX 10
|
||||
#endif
|
||||
int8_t bot_channel_idx; // index into known_channels, -1 = PSK malformed, bot silently off
|
||||
unsigned long bot_next_reply_at; // cooldown gate, 0 = not armed
|
||||
uint32_t bot_replies_sent;
|
||||
@@ -268,6 +271,8 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
||||
struct BotPeer { uint32_t name_hash; unsigned long next_at; };
|
||||
BotPeer bot_peers[BOT_PEER_SLOTS]; // per-odesilatel okno, LRU
|
||||
uint32_t bot_last_reply_secs; // RTC time of the last reply, 0 = never
|
||||
unsigned long bot_burst_until[BOT_BURST_MAX > 0 ? BOT_BURST_MAX : 1]; // konce oken poslednich odpovedi, kruh
|
||||
uint8_t bot_burst_head; // nejstarsi z poslednich BOT_BURST_MAX odpovedi
|
||||
#endif
|
||||
CayenneLPP telemetry;
|
||||
unsigned long set_radio_at, revert_radio_at;
|
||||
|
||||
Reference in new issue
Block a user