change var name

This commit is contained in:
tablatronix
2019-01-20 10:11:24 -06:00
parent 65ad141008
commit 0e75b669b7
@@ -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();