mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-28 17:56:21 +02:00
0.8.98
fix compile
This commit is contained in:
parent
4291b4c83f
commit
8a0b9e9029
1 changed files with 11 additions and 11 deletions
|
@ -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…
Add table
Reference in a new issue