Skip to content

Commit

Permalink
fix for pairing status... again
Browse files Browse the repository at this point in the history
  • Loading branch information
andysheen committed Sep 29, 2020
1 parent 74c9271 commit e848ac1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ESP32-SOCKETIO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void setPairedStatus() {

String getCurrentPairedStatusAsString() {
String currentPairedStatusAsString = "";

switch (currentPairedStatus) {
case remoteSetup: currentPairedStatusAsString = "remoteSetup"; break;
case localSetup: currentPairedStatusAsString = "localSetup"; break;
Expand Down Expand Up @@ -266,7 +266,7 @@ void loop() {
wifiCheck();
break;
}

buttonBuiltIn.check();
buttonExternal.check();
buttonTouch.check();
Expand Down
4 changes: 1 addition & 3 deletions socket_server.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
void onWsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len) {

if (type == WS_EVT_CONNECT) {
if (getNumberOfMacAddresses() >= 2) {
currentPairedStatus = localSetup;
}
currentPairedStatus = localSetup;
Serial.println("Websocket client connection received");
webSocketClientID = client->id();
Serial.println(client->id());
Expand Down

0 comments on commit e848ac1

Please sign in to comment.