Minor tweaks to LED timings and placement of statusLED.start() in apConfig()
Ensures statusLED indicates a client is connected as soon as it received its first GET, even if the re-direction to /landing-page is yet to be accessed. This was needed to trigger LED_AP_CONNECTED when connecting with QR code.
This commit is contained in:
parent
f3b1de2f6b
commit
43c04a7adf
|
|
@ -311,8 +311,6 @@ void Network::processRequest(char *body, char *formData){
|
|||
|
||||
landingPage=true;
|
||||
|
||||
homeSpan.statusLED.start(LED_AP_CONNECTED);
|
||||
|
||||
responseBody+="<p>Welcome to HomeSpan! This page allows you to configure the above HomeSpan device to connect to your WiFi network.</p>"
|
||||
"<p>The LED on this device should be <em>double-blinking</em> during this configuration.</p>"
|
||||
"<form action=\"/configure\" method=\"post\">"
|
||||
|
|
@ -335,8 +333,10 @@ void Network::processRequest(char *body, char *formData){
|
|||
|
||||
} else
|
||||
|
||||
if(!landingPage)
|
||||
if(!landingPage){
|
||||
responseHead="HTTP/1.1 307 Temporary Redirect\r\nLocation: /landing-page\r\n";
|
||||
homeSpan.statusLED.start(LED_AP_CONNECTED);
|
||||
}
|
||||
|
||||
responseHead+="\r\n"; // add blank line between reponse header and body
|
||||
responseBody+="</body></html>"; // close out body and html tags
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#define LED_ALERT 100 // rapid flashing
|
||||
#define LED_WIFI_CONNECTING 2000 // slow flashing
|
||||
#define LED_AP_STARTED 100,0.5,2,300 // rapid double-blink
|
||||
#define LED_AP_CONNECTED 500,0.3,2,1000 // medium double-blink
|
||||
#define LED_AP_CONNECTED 300,0.5,2,400 // medium double-blink
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Message Log Level Control Macros //
|
||||
|
|
|
|||
Loading…
Reference in New Issue