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: 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,

Loading…
Cancel
Save