From 31d6636754c1794f0025744168b8bbb580879160 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Sat, 10 May 2025 05:08:04 +0300 Subject: [PATCH] Send mavlink udp packets in unicast after connected Tests and research show this is more efficient way of sending telemetry --- flix/wifi.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flix/wifi.ino b/flix/wifi.ino index c23365a..5dad3e8 100644 --- a/flix/wifi.ino +++ b/flix/wifi.ino @@ -19,11 +19,12 @@ void setupWiFi() { print("Setup Wi-Fi\n"); WiFi.softAP(WIFI_SSID, WIFI_PASSWORD); udp.begin(WIFI_UDP_PORT); + udp.beginPacket("255.255.255.255", WIFI_UDP_PORT); // broadcast packets until connected } void sendWiFi(const uint8_t *buf, int len) { if (WiFi.softAPIP() == IPAddress(0, 0, 0, 0) && WiFi.status() != WL_CONNECTED) return; - udp.beginPacket(WiFi.softAPBroadcastIP(), WIFI_UDP_PORT); + udp.beginPacket(); udp.write(buf, len); udp.endPacket(); }