From 60c2d5645d2d6931fd4bff0a92f9bfb8baa08086 Mon Sep 17 00:00:00 2001 From: Gregg Date: Sat, 3 Oct 2020 20:18:58 -0500 Subject: [PATCH] Update HomeSpan.cpp Tweaks to WiFi reset code so that instead of re-starting, HomeSpan simply disconnects WiFi, which triggers initWifi() upon the next call to poll((). --- src/HomeSpan.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index 3b84cb7..8e56454 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -178,8 +178,7 @@ void Span::poll() { if(controlButton.triggered(5000,10000)){ statusLED.off(); if(controlButton.longPress()){ - delay(2000); - processSerialCommand("W"); // DELETE WiFi Data and Restart + processSerialCommand("W"); // DELETE WiFi Data } else { controlButton.reset(); processSerialCommand("U"); // UNPAIR Device @@ -312,12 +311,8 @@ void Span::initWifi(){ while(millis()-sTime