From 70459df8dd7f5cba3ebce565f7bdfeeed4c7cecf Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 16 Jul 2026 11:30:10 +0300 Subject: [PATCH] Disable swarming in espnow proxy by default --- tools/espnow-proxy/espnow-proxy.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/espnow-proxy/espnow-proxy.ino b/tools/espnow-proxy/espnow-proxy.ino index c42c914..94bcea1 100644 --- a/tools/espnow-proxy/espnow-proxy.ino +++ b/tools/espnow-proxy/espnow-proxy.ino @@ -11,16 +11,21 @@ #include #include "../../flix/util.h" +const bool DISABLE_SWARM = true; const int CHANNEL = 6; char key[ESP_NOW_KEY_LEN + 1] = {0}; // with trailing null Preferences storage; std::vector peers; +bool stop = false; void onNewPeer(const esp_now_recv_info_t *info, const uint8_t *data, int len, void *arg) { if (len != 4 || memcmp(data, "flix", 4) != 0) return; // check if discovery message + if (stop) return; + if (DISABLE_SWARM) stop = true; + Serial.printf("New peer: " MACSTR "\n", MAC2STR(info->src_addr)); ESPNOWSerial *link = new ESPNOWSerial(info->src_addr, CHANNEL, WIFI_IF_AP); link->begin();