diff --git a/src/WebSocket.cpp b/src/WebSocket.cpp index c696ca7..38c7727 100644 --- a/src/WebSocket.cpp +++ b/src/WebSocket.cpp @@ -129,10 +129,15 @@ namespace WebSocket m_socket.loop(); } + void broadcastMessage(String msg) + { + WebSocket::m_socket.broadcastTXT(msg.c_str()); + } + void broadcastStatus() { String msg = "{\"status\": " + String((int)FastLEDHub.getStatus()) + ", \"currentAnimation\": \"" + FastLEDHub.getCurrentAnimationName() + "\"}"; - WebSocket::m_socket.broadcastTXT(msg.c_str()); + broadcastMessage(msg); } } // namespace WebSocket