diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index 2dc93b9..97be61b 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -16,9 +16,10 @@ * along with LoRa APRS iGate. If not, see . */ -#include -#include +#include +#include #include "configuration.h" +#include "network_manager.h" #include "aprs_is_utils.h" #include "station_utils.h" #include "board_pinout.h" @@ -32,6 +33,7 @@ extern Configuration Config; +extern NetworkManager *networkManager; extern WiFiClient aprsIsClient; extern uint32_t lastScreenOn; extern String firstLine; @@ -93,7 +95,7 @@ namespace APRS_IS_Utils { void checkStatus() { String wifiState, aprsisState; - if (WiFi.status() == WL_CONNECTED) { + if (networkManager->isWiFiConnected()) { wifiState = "OK"; } else { if (backupDigiMode || Config.digi.ecoMode == 1 || Config.digi.ecoMode == 2) { @@ -408,7 +410,7 @@ namespace APRS_IS_Utils { } void firstConnection() { - if (Config.aprs_is.active && (WiFi.status() == WL_CONNECTED) && !aprsIsClient.connected()) { + if (Config.aprs_is.active && networkManager->isConnected() && !aprsIsClient.connected()) { connect(); while (!passcodeValid) { listenAPRSIS(); @@ -416,4 +418,4 @@ namespace APRS_IS_Utils { } } -} \ No newline at end of file +}