fix: digi mode with auto ap
This commit is contained in:
parent
930061bdc0
commit
b45633ab48
|
|
@ -82,11 +82,11 @@ void loop() {
|
|||
|
||||
WIFI_Utils::checkIfAutoAPShouldPowerOff();
|
||||
|
||||
if (!WiFiConnected) {
|
||||
thirdLine = Utils::getLocalIP();
|
||||
}
|
||||
|
||||
if (stationMode==1 || stationMode==2 ) { // iGate (1 Only Rx / 2 Rx+Tx)
|
||||
if (!WiFiConnected) {
|
||||
thirdLine = Utils::getLocalIP();
|
||||
}
|
||||
|
||||
WIFI_Utils::checkWiFi();
|
||||
if (!espClient.connected()) {
|
||||
APRS_IS_Utils::connect();
|
||||
|
|
|
|||
|
|
@ -27,6 +27,16 @@ namespace WIFI_Utils {
|
|||
}
|
||||
}
|
||||
|
||||
void startAutoAP() {
|
||||
WiFi.mode(WIFI_MODE_NULL);
|
||||
|
||||
WiFi.mode(WIFI_AP);
|
||||
WiFi.softAP(Config.callsign + " AP", "1234567890");
|
||||
|
||||
WiFiAutoAPTime = millis();
|
||||
WiFiAutoAPStarted = true;
|
||||
}
|
||||
|
||||
void startWiFi() {
|
||||
bool startAP = false;
|
||||
if (currentWiFi->ssid == "") {
|
||||
|
|
@ -88,13 +98,7 @@ namespace WIFI_Utils {
|
|||
Serial.println("\nNot connected to WiFi! Starting Auto AP");
|
||||
show_display("", "", " Starting Auto AP", " Please connect to it " , " loading ...", 1000);
|
||||
|
||||
WiFi.mode(WIFI_MODE_NULL);
|
||||
|
||||
WiFi.mode(WIFI_AP);
|
||||
WiFi.softAP(Config.callsign + " AP", "1234567890");
|
||||
|
||||
WiFiAutoAPTime = millis();
|
||||
WiFiAutoAPStarted = true;
|
||||
startAutoAP();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +136,7 @@ namespace WIFI_Utils {
|
|||
} else {
|
||||
Serial.println("stationMode ---> DigiRepeater (Rx freq != Tx freq)");
|
||||
}
|
||||
WiFi.mode(WIFI_OFF);
|
||||
startAutoAP();
|
||||
btStop();
|
||||
} else if (stationMode==5) {
|
||||
Serial.println("stationMode ---> iGate when Wifi/APRS available (DigiRepeater when not)");
|
||||
|
|
|
|||
Loading…
Reference in New Issue