|
@ -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: |
|
|
private: |
|
|
void sendNTPpacket(IPAddress& address) { |
|
|
void sendNTPpacket(IPAddress& address) { |
|
|
//DPRINTLN(DBG_VERBOSE, F("wifi::sendNTPpacket"));
|
|
|
//DPRINTLN(DBG_VERBOSE, F("wifi::sendNTPpacket"));
|
|
@ -200,17 +211,6 @@ class AhoyNetwork { |
|
|
mUdp.close(); |
|
|
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: |
|
|
protected: |
|
|
enum class NetworkState : uint8_t { |
|
|
enum class NetworkState : uint8_t { |
|
|
DISCONNECTED, |
|
|
DISCONNECTED, |
|
|