From 4345c274539193c5937b550018a287d16e365b99 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 5 Dec 2021 16:41:50 +0100 Subject: [PATCH] don't set LEDs to error when disconnecting --- src/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 45e3de1..3d899d9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,16 +68,15 @@ void handleWebSocketEvent(WStype_t type, uint8_t * payload, size_t length) { like that. It is important we don't disable the LEDs, in case the OBS instance is still running. - We do, however, set the LEDs to the "error" state, to - indicate we don't currently know what OBS is showing. + We can't set the LEDs to "error", because if someone + quits OBS, we will get disconnected. */ - set_error(); break; case WStype_CONNECTED: Serial.printf("[WS] connected to %s\n", payload); - // Find out if we need authentication #ifdef OBS_PASS + // Find out if we need authentication webSocket.sendTXT("{\"request-type\":\"GetAuthRequired\",\"message-id\":\"1\"}"); #else webSocket.sendTXT("{\"request-type\":\"GetCurrentScene\",\"message-id\":\"3\"}");