🚫 Adds stop function

This commit is contained in:
Rune Harlyk
2024-02-05 21:02:58 +01:00
parent cdd3966dd5
commit f49bc5a9e6
2 changed files with 11 additions and 4 deletions
+3 -2
View File
@@ -277,8 +277,9 @@ wss.on("connection", (ws) => {
}
break;
case "system/stop":
model.running = false;
ws.send(JSON.stringify(settings));
ws.clientState.model.running = false;
ws.clientState.logs.push("[2024-02-05 19:10:00] [Warning] STOPPING SERVOS")
ws.send(JSON.stringify({type:"log", log:ws.clientState.logs.last()}));
break;
default:
ws.send(JSON.stringify({ error: "Unknown request type" }));