Add WebSocket support for switch status updates
- Define `LoadSwStatus` protobuf message for switch state data (`main` and `usb`). - Introduce `updateSwitchStatusUI` to synchronize UI with WebSocket switch status payloads. - Update backend logic to manage and broadcast switch status changes dynamically. Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
@@ -28,11 +28,18 @@ message UartData {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
// Contains load sw status
|
||||
message LoadSwStatus {
|
||||
bool main = 1;
|
||||
bool usb = 2;
|
||||
}
|
||||
|
||||
// Top-level message for all websocket communication
|
||||
message StatusMessage {
|
||||
oneof payload {
|
||||
SensorData sensor_data = 1;
|
||||
WifiStatus wifi_status = 2;
|
||||
UartData uart_data = 3;
|
||||
LoadSwStatus sw_status = 3;
|
||||
UartData uart_data = 4;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user