mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-14 07:01:30 +10:00
change var name
This commit is contained in:
@@ -14,7 +14,7 @@ WiFiManager wm;
|
||||
unsigned int timeout = 120; // seconds to run for
|
||||
unsigned int startTime = millis();
|
||||
bool portalRunning = false;
|
||||
bool startCP = false; // start AP and webserver if true, else start only webserver
|
||||
bool startAP = false; // start AP and webserver if true, else start only webserver
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once
|
||||
@@ -35,7 +35,7 @@ void doWiFiManager(){
|
||||
if((millis()-startTime) > (timeout*1000)){
|
||||
Serial.println("portaltimeout");
|
||||
portalRunning = false;
|
||||
if(startCP){
|
||||
if(startAP){
|
||||
wm.stopConfigPortal();
|
||||
}
|
||||
else{
|
||||
@@ -46,7 +46,7 @@ void doWiFiManager(){
|
||||
|
||||
// is configuration portal requested?
|
||||
if(digitalRead(TRIGGER_PIN) == LOW && (!portalRunning)) {
|
||||
if(startCP){
|
||||
if(startAP){
|
||||
Serial.println("Button Pressed, Starting Config Portal");
|
||||
wm.setConfigPortalBlocking(false);
|
||||
wm.startConfigPortal();
|
||||
|
||||
Reference in New Issue
Block a user