| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Update callers to use the printer.command_error reference instead of
directly using homing.CommandError() when raising or catching errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Allow clients to send their version info to klipper and arrange for
that info to be logged.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename printer.gcode.action_emergency_stop() to
action_emergency_stop(), printer.gcode.action_respond_info() to
action_respond_info(), and printer.gcode.action_respond_error() to
action_raise_error() in command templates.
This simplifies the get_status() interface, as returning callable
functions from that interface was confusing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert to a new json message format. Requests look like:
{"id":14, "method": "info", "params": {}}
and responses look like:
{"id": 14, "result": {}}
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Clients will now only receive messages that they've subscribed to.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Clients can now subscribe to the webhooks get_status() info to
determine if the printer state changes. It is no longer needed to
send a message to all clients on a shutdown transition.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Implement a new subscription system for get_status() updates.
Subscriptions are per-client. After an initial update, only changes
will be transmitted. Responses are only transmitted to the client
that issued the subscription.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new "gcode/subscribe_output" webhook endpoint to subscribe to
gcode output. Only client connections that subscribe to the gcode
output will receive that output.
This also moves all the gcode webhooks from gcode.py to webhooks.py
and arranges for gcode.py to be initialized prior to webhooks.py.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Don't require or use the "method" parameter of requests. This
simplifies the interface.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Use the "info" webhook to pass critical process information back to
the caller. The remaining users of register_static_path() can get the
required information via get_status() calls.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Don't default to "/tmp/klippy_uds" for the webhooks unix domain socket
filename. Instead, require the filename to be specified on the
command-line (via a new "-a" parameter).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
| |
This prevents ClientConnection.send() from blocking, removing the possibility that callers become reentrant.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
| |
This class provides endpoints that allow connected hosts to fetch the state of printer objects and subscribe to state "pushed" over the connection.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
| |
This may be used to execute formatted RPC calls.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
|
| |
No need to indirectly shutdown via the gcode class - just call
printer.invoke_shutdown() directly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Create the initial gcode class via new module level
add_early_printer_objects() function.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
| |
Changing this check from debugoutput to debuginput allows remote applications to perform tests against Klippy without an MCU connected.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
| |
This prevents _process_data from blocking and becoming reentrant.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
The webhooks module provides a means for Klippy to register remote API endpoints.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|