Files
led-driver/src/runtime_state.py
Jimmy 3ee89ce3b4 feat(driver): add HTTP routes, startup split, and binary envelope support
Wire controller messages through new modules (background tasks, runtime state,
startup) and add binary envelope handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 14:54:12 +12:00

13 lines
336 B
Python

class RuntimeState:
def __init__(self):
self.hello = True
self.ws_client_count = 0
def ws_connected(self):
self.ws_client_count += 1
self.hello = False
def ws_disconnected(self):
self.ws_client_count = max(0, self.ws_client_count - 1)
self.hello = self.ws_client_count == 0