mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 01:29:33 +00:00
Revert sending mavlink udp packets in unicast
This requires more complex approach as client ip may change between reconnections
This commit is contained in:
parent
2bcab6edb3
commit
7e5a75a01f
@ -20,12 +20,11 @@ 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_REMOTE_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();
|
||||
udp.beginPacket(WiFi.softAPBroadcastIP(), WIFI_UDP_REMOTE_PORT);
|
||||
udp.write(buf, len);
|
||||
udp.endPacket();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user