test for Killed Wifi Active

This commit is contained in:
richonguzman
2024-10-06 23:23:22 -03:00
parent df9060d906
commit 58d8736969
8 changed files with 60 additions and 52 deletions
+9 -7
View File
@@ -22,7 +22,7 @@ String inputSerialBuffer = "";
namespace TNC_Utils {
void setup() {
if (Config.tnc.enableServer) {
if (Config.tnc.enableServer && Config.wifiAutoAP.active) {
tncServer.stop();
tncServer.begin();
}
@@ -133,12 +133,14 @@ namespace TNC_Utils {
}
void loop() {
if (Config.tnc.enableServer) {
checkNewClients();
readFromClients();
}
if (Config.tnc.enableSerial) {
readFromSerial();
if (Config.wifiAutoAP.active) {
if (Config.tnc.enableServer) {
checkNewClients();
readFromClients();
}
if (Config.tnc.enableSerial) {
readFromSerial();
}
}
}
}