mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-09 15:03:56 +01:00
Use AutoAP
This commit is contained in:
parent
d8b658df30
commit
e241321abc
|
|
@ -102,7 +102,9 @@ void setup() {
|
|||
Serial.begin(115200);
|
||||
networkManager = new NetworkManager();
|
||||
networkManager->setup();
|
||||
networkManager->setAPTimeout(Config.wifiAutoAP.timeout * 60 * 1000); // Convert minutes to milliseconds
|
||||
if (Config.wifiAutoAP.enabled) {
|
||||
networkManager->setAPTimeout(Config.wifiAutoAP.timeout * 60 * 1000); // Convert minutes to milliseconds
|
||||
}
|
||||
networkManager->setHostName("iGATE-" + Config.callsign);
|
||||
POWER_Utils::setup();
|
||||
Utils::setupDisplay();
|
||||
|
|
|
|||
|
|
@ -96,8 +96,11 @@ namespace WIFI_Utils {
|
|||
}
|
||||
|
||||
if (!hasNetworks) {
|
||||
Serial.println("WiFi SSID not set! Starting Auto AP");
|
||||
startAutoAP();
|
||||
Serial.println("WiFi SSID not set!");
|
||||
if (Config.wifiAutoAP.enabled) {
|
||||
Serial.println("Starting AP fallback...");
|
||||
startAutoAP();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -114,10 +117,14 @@ namespace WIFI_Utils {
|
|||
Serial.println(networkManager->getWiFimacAddress());
|
||||
displayShow("", " Connected!!", "" , " loading ...", 1000);
|
||||
} else {
|
||||
Serial.println("\nNot connected to WiFi! Starting Auto AP");
|
||||
displayShow("", " WiFi Not Connected!", "" , " loading ...", 1000);
|
||||
|
||||
startAutoAP();
|
||||
Serial.println("\nNot connected to WiFi!");
|
||||
if (Config.wifiAutoAP.enabled) {
|
||||
Serial.println("Starting AP fallback...");
|
||||
displayShow("", " WiFi Not Connected!", "" , " loading ...", 1000);
|
||||
startAutoAP();
|
||||
} else {
|
||||
displayShow("", " WiFi Not Connected!", "" , " loading ...", 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue