don't set LEDs to error when disconnecting

This commit is contained in:
Franzi 2021-12-05 16:41:50 +01:00
parent 8c47d1c0d3
commit 4345c27453
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -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\"}");