feat: implement filament and spool creation in Spoolman API

This commit is contained in:
Manuel Weiser committed 2025-08-28 15:17:42 +02:00
1 parent c5d24d5972
commit 1f01af4da9
5 files changed
+323 -144

No files matched your search

+8 -2
View File
@@ -48,9 +48,15 @@ void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventTyp
} else if (type == WS_EVT_PONG) {
Serial.printf("WebSocket Client #%u pong\n", client->id());
} else if (type == WS_EVT_DATA) {
String message = String((char*)data);
JsonDocument doc;
deserializeJson(doc, message);
DeserializationError error = deserializeJson(doc, (char*)data, len);
//String message = String((char*)data);
//deserializeJson(doc, message);
if (error) {
Serial.println("JSON deserialization failed: " + String(error.c_str()));
return;
}
if (doc["type"] == "heartbeat") {
// Sende Heartbeat-Antwort