Skip to content

WIP: Handle SET_VALUE for speed, flow and temperatures; drop gcode force - #1049

Draft
ondratu wants to merge 53 commits into
masterfrom
websockets
Draft

ondratu wants to merge 53 commits into
masterfrom
websockets

Conversation

@ondratu

@ondratu ondratu commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Connect now sends speed, flow, nozzle and bed temperature changes as the high-level SET_VALUE command instead of forced gcodes. PrusaLink accepts exactly one of "speed", "flow", "nozzle_temperature" or "bed_temperature" and runs it right away, even during a print. Out-of-range or non-integer values, unknown keys, disallowed states and a nozzle target below the extrusion minimum while printing are rejected.

Executing gcode no longer honours the force flag, state checks always apply. Resetting the printer is not affected.

@ondratu
ondratu force-pushed the websockets branch 3 times, most recently from c172eb6 to 302a00d Compare October 9, 2026 10:34
Add pyproject.toml with pytest and coverage settings, so plain pytest
reports the coverage of prusa.link. CI now also tests the default Python
of the current Raspberry Pi OS and publishes the coverage table.
Read the installed packages using importlib.metadata instead of
pkg_resources, which current setuptools no longer ships.
It pointed to the page of the 'entity too large' error. The error has
its own page now.
Connect now sends speed, flow, nozzle and bed temperature changes as the
high-level SET_VALUE command instead of forced gcodes. PrusaLink accepts
exactly one of "speed", "flow", "nozzle_temperature" or "bed_temperature"
and runs it right away, even during a print. Out-of-range or non-integer
values, unknown keys, disallowed states and a nozzle target below the
extrusion minimum while printing are rejected.

Executing gcode no longer honours the force flag, state checks always
apply. Resetting the printer is not affected.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Test coverage of prusa.link

Name Stmts Miss Cover
prusa/link/__init__.py 11 0 100%
prusa/link/__main__.py 156 5 97%
prusa/link/camera_governor.py 33 0 100%
prusa/link/cameras/encoders.py 214 154 28%
prusa/link/cameras/picamera_driver.py 192 147 23%
prusa/link/cameras/v4l2.py 833 11 99%
prusa/link/cameras/v4l2_driver.py 358 266 26%
prusa/link/conditions.py 287 9 97%
prusa/link/config.py 174 1 99%
prusa/link/const.py 148 0 100%
prusa/link/daemon.py 58 0 100%
prusa/link/interesting_logger.py 115 1 99%
prusa/link/multi_instance/__main__.py 153 0 100%
prusa/link/multi_instance/config_component.py 226 0 100%
prusa/link/multi_instance/const.py 23 0 100%
prusa/link/multi_instance/controller.py 37 0 100%
prusa/link/multi_instance/ipc_queue_adapter.py 92 12 87%
prusa/link/multi_instance/runner_component.py 41 0 100%
prusa/link/multi_instance/web.py 122 4 97%
prusa/link/printer_adapter/auto_telemetry.py 67 0 100%
prusa/link/printer_adapter/command.py 57 0 100%
prusa/link/printer_adapter/command_handlers.py 348 3 99%
prusa/link/printer_adapter/command_queue.py 75 0 100%
prusa/link/printer_adapter/file_printer.py 210 0 100%
prusa/link/printer_adapter/filesystem/sd_card.py 212 4 98%
prusa/link/printer_adapter/filesystem/storage.py 139 0 100%
prusa/link/printer_adapter/filesystem/storage_controller.py 55 0 100%
prusa/link/printer_adapter/ip_updater.py 110 0 100%
prusa/link/printer_adapter/job.py 156 0 100%
prusa/link/printer_adapter/keepalive.py 39 1 97%
prusa/link/printer_adapter/lcd_printer.py 304 234 23%
prusa/link/printer_adapter/mmu_observer.py 61 0 100%
prusa/link/printer_adapter/model.py 17 1 94%
prusa/link/printer_adapter/print_stat_doubler.py 22 0 100%
prusa/link/printer_adapter/print_stats.py 53 0 100%
prusa/link/printer_adapter/printer_polling.py 538 418 22%
prusa/link/printer_adapter/prusa_link.py 583 449 23%
prusa/link/printer_adapter/special_commands.py 70 0 100%
prusa/link/printer_adapter/state_manager.py 396 3 99%
prusa/link/printer_adapter/structures/carousel.py 132 4 97%
prusa/link/printer_adapter/structures/heap.py 92 0 100%
prusa/link/printer_adapter/structures/item_updater.py 286 11 96%
prusa/link/printer_adapter/structures/mc_singleton.py 12 0 100%
prusa/link/printer_adapter/structures/model_classes.py 104 0 100%
prusa/link/printer_adapter/structures/module_data_classes.py 97 0 100%
prusa/link/printer_adapter/structures/regular_expressions.py 70 0 100%
prusa/link/printer_adapter/telemetry_passer.py 248 3 99%
prusa/link/printer_adapter/updatable.py 34 6 82%
prusa/link/sdk_augmentation/command_handler.py 17 0 100%
prusa/link/sdk_augmentation/file.py 14 0 100%
prusa/link/sdk_augmentation/printer.py 112 0 100%
prusa/link/serial/helpers.py 28 0 100%
prusa/link/serial/instruction.py 84 0 100%
prusa/link/serial/is_planner_fed.py 99 1 99%
prusa/link/serial/serial.py 103 3 97%
prusa/link/serial/serial_adapter.py 258 1 99%
prusa/link/serial/serial_parser.py 92 1 99%
prusa/link/serial/serial_queue.py 333 2 99%
prusa/link/service_discovery.py 64 0 100%
prusa/link/util.py 158 11 93%
prusa/link/web/__init__.py 75 0 100%
prusa/link/web/cameras.py 182 1 99%
prusa/link/web/connection.py 78 0 100%
prusa/link/web/controls.py 126 0 100%
prusa/link/web/errors.py 156 0 100%
prusa/link/web/files.py 205 6 97%
prusa/link/web/files_legacy.py 292 13 96%
prusa/link/web/lib/__init__.py 5 0 100%
prusa/link/web/lib/auth.py 81 5 94%
prusa/link/web/lib/classes.py 36 7 81%
prusa/link/web/lib/core.py 22 0 100%
prusa/link/web/lib/files.py 256 9 96%
prusa/link/web/lib/view.py 48 0 100%
prusa/link/web/lib/wizard.py 128 0 100%
prusa/link/web/link_info.py 9 0 100%
prusa/link/web/main.py 335 38 89%
prusa/link/web/settings.py 132 0 100%
prusa/link/web/wizard.py 219 3 99%
TOTAL 11607 1848 84%

7 empty files skipped.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant