By default the WiFi channel is used
This commit is contained in:
Oleg Kalachev
2026-05-21 02:51:27 +03:00
parent 8e02b65b99
commit 2027514af7
-2
View File
@@ -39,12 +39,10 @@ void setupWiFi() {
} else if (wifiMode == W_ESPNOW) {
WiFi.mode(WIFI_AP);
WiFi.setChannel(espnowChannel);
espnow.setChannel(espnowChannel);
espnow.addr(MacAddress(storage.getString("ESPNOW_PEER_MAC", "FF:FF:FF:FF:FF:FF").c_str()));
String key = storage.getString("ESPNOW_PEER_KEY", "");
espnow.setKey(key.isEmpty() ? nullptr : (const uint8_t *)key.c_str());
espnow.begin();
espnowBroadcast.setChannel(espnowChannel);
espnowBroadcast.begin();
}