Skip to content

Commit

Permalink
0.8.98
Browse files Browse the repository at this point in the history
fix compile
  • Loading branch information
lumapu committed Mar 25, 2024
1 parent 4291b4c commit 8a0b9e9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/network/AhoyNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8a0b9e9

Please sign in to comment.