From 8a0b9e90299d385dd7d1de972f0a98da06add4c3 Mon Sep 17 00:00:00 2001 From: lumapu Date: Tue, 26 Mar 2024 00:18:24 +0100 Subject: [PATCH] 0.8.98 fix compile --- src/network/AhoyNetwork.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/network/AhoyNetwork.h b/src/network/AhoyNetwork.h index 5ce668df..f90096db 100644 --- a/src/network/AhoyNetwork.h +++ b/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: 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,