mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
Show Snapmaker U1 camera in Device tab
The U1 exposes no /server/webcams/list entry; its camera only captures after an explicit camera.start_monitor RPC, which the Moonraker websocket executes unauthenticated but only answers over MQTT - so the call is fire and forget. Start the camera when the camera view is shown and renew every 300 s: the printer retires the capture task at ~362 s and stop_monitor is accepted but ineffective, so teardown is simply to stop renewing. Frames land in monitor.jpg as still JPEGs (~2 fps at interval 0), so the webview loads a local HTML wrapper that repolls with a cache buster.
This commit is contained in:
@@ -93,6 +93,11 @@ public:
|
||||
{ return ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED; }
|
||||
virtual int command_ams_select_tray(std::string, std::string, int, bool)
|
||||
{ return ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED; }
|
||||
// why: some printers emit camera frames only while explicitly asked, and retire the
|
||||
// capture task on their own - the camera view starts it and renews it. Printers with an
|
||||
// always-on stream need nothing here, hence the honest refusal by default.
|
||||
virtual int command_start_camera(std::string)
|
||||
{ return ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED; }
|
||||
|
||||
/**
|
||||
* Establish a direct LAN connection to a printer.
|
||||
|
||||
Reference in New Issue
Block a user