feat: add ability to send full frame via ws

This commit is contained in:
mimi@chaospott.de
2026-06-28 19:07:43 +02:00
parent 5e85fef30d
commit 496eb07632
+8
View File
@@ -562,6 +562,14 @@ def frame_ws(ws: geventwebsocket.websocket.WebSocket):
if data.channels == 4 and "w" in msg:
data.buffer[..., 3] = msg["w"]
runner.app.datasource.pushData(data)
elif msg["ty"] == "full":
if runner.app.name != "pixelcanvas":
startApp("pixelcanvas")
data = runner.app.datasource.getData().clone()
data.created = time.time()
data.buffer = np.reshape(msg["data"], (40,80,3))
runner.app.datasource.pushData(data)
@bottle.route("/save_frame")