Skip to content

Commit

Permalink
add 4 sec delay on client before shutting down after exchanging wifi …
Browse files Browse the repository at this point in the history
…credentials
  • Loading branch information
mikevanis committed Oct 9, 2020
1 parent 7ff7316 commit 8e17a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sockets_client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
case WStype_DISCONNECTED:
Serial.println("[WSc] Disconnected!\n");
//Hot fix for when client doesn't catch RESTART command
softReset(0);
softReset(4000);
break;
case WStype_CONNECTED:
Serial.println("Connected!");
Expand All @@ -25,7 +25,7 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
#endif
String output = (char *)payload;
if (output == "RESTART") {
softReset(0);
softReset(4000);
Serial.println("i'm going to reset");
} else {
decodeData((char *)payload);
Expand Down

0 comments on commit 8e17a7e

Please sign in to comment.