Browse Source

0.8.98

fix compile
pull/1549/head
lumapu 10 months ago
parent
commit
8a0b9e9029
  1. 22
      src/network/AhoyNetwork.h

22
src/network/AhoyNetwork.h

@ -161,6 +161,17 @@ class AhoyNetwork {
}
}
#if !defined(ETHERNET)
void sortRSSI(int *sort, int n) {
for (int i = 0; i < n; i++)
sort[i] = i;
for (int i = 0; i < n; i++)
for (int j = i + 1; j < n; j++)
if (WiFi.RSSI(sort[j]) > WiFi.RSSI(sort[i]))
std::swap(sort[i], sort[j]);
}
#endif
private:
void sendNTPpacket(IPAddress& address) {
//DPRINTLN(DBG_VERBOSE, F("wifi::sendNTPpacket"));
@ -200,17 +211,6 @@ class AhoyNetwork {
mUdp.close();
}
#if !defined(ETHERNET)
void sortRSSI(int *sort, int n) {
for (int i = 0; i < n; i++)
sort[i] = i;
for (int i = 0; i < n; i++)
for (int j = i + 1; j < n; j++)
if (WiFi.RSSI(sort[j]) > WiFi.RSSI(sort[i]))
std::swap(sort[i], sort[j]);
}
#endif
protected:
enum class NetworkState : uint8_t {
DISCONNECTED,

Loading…
Cancel
Save