aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_k1c.py
AgeCommit message (Collapse)AuthorFilesLines
7 hoursfeat(k1c): live camera stream instead of snapshotsHEADmasterDanilo M.1-4/+4
The camera was a snapshot reloaded on every poll. It is now the webcam's MJPEG stream_url, which an <img> plays by itself at the camera's own rate (15 fps on the K1C). The stream connects only while the K1C tab is on screen and the page visible, and disconnects otherwise, so a hidden tab does not keep the printer streaming. A dropped stream hides the image and reconnects on the next poll. The image is shown as soon as its source is set, since a never-ending stream may never fire load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 hoursfix(k1c): read the part fan from Creality's output_pin fan0Danilo M.1-0/+7
Creality's K1C firmware drives the part cooling fan as `output_pin fan0` and reports the standard `fan` object with speed null, so the tab showed no fan speed. The standard object still wins when it has a value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 hoursfeat: K1C printer tab and proper cards for switched-off sourcesDanilo M.1-0/+108
A K1C tab follows a Klipper printer through Moonraker ([k1c] url): state, file, progress with elapsed, left and finish time, layer, the slicer's model thumbnail, nozzle and bed with target and power, fan, speed, position, filament, and the camera snapshot. It is read-only bar one action, the emergency stop (M112), behind a press-and-hold button so a stray touch on an always-on tablet cannot kill a print. Klipper being down (after a stop) shows its message in a red banner. The printer is often off, so a failed poll backs off 10s instead of costing every tick a timeout. File metadata is fetched once per job; the slicer's estimate covers the start of a print until the file-position estimate settles. The tablet loads the camera and the thumbnail straight from the printer, so both need it on the printer's LAN. OBS, the build VM and LLM usage showed raw text when their source was off ("OBS offline: [Errno 111] ..."). They now share static/offline.js: a greyed app icon, what is off, what brings it back, and a pulsing "checking" note, with the raw error in the tooltip. OBS hides its empty blocks while off. The card is not rebuilt on every poll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>