mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-29 10:16: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:
|
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…
Add table
Reference in a new issue