12 Commits

Author SHA1 Message Date
zkk
797c5aa322 增加取消打印宏调用
Squashed commit of the following:

commit 3dbd8d3355059b4bb39d680b1a6deff9f6277c7e
Merge: 34c1604 ef2e38b
Author: zkk <1007518571@qq.com>
Date:   Thu Dec 19 17:07:14 2024 +0800

    Merge branch 'develop' of https://server.creatbot.com/Gitea/CreatBot/CreatbotMoonraker into develop

commit ef2e38b870357e74fd69710fa3b09fa38604feff
Author: ruipeng <1041589370@qq.com>
Date:   Thu Dec 19 11:01:45 2024 +0800

    新增取消打印宏命令

commit 34c1604d8c5a79e95e94f13c34b5635672df47d1
Author: zkk <1007518571@qq.com>
Date:   Tue Dec 3 14:33:32 2024 +0800

    关闭更新管理中指定节点的配置

commit d3355361dc7ff974a9fef25956adc2966ba58120
Merge: 333a789 9c00be2
Author: zkk <1007518571@qq.com>
Date:   Fri Nov 29 10:04:34 2024 +0800

    Merge remote-tracking branch 'origin/develop' into develop

commit 9c00be2f4e21f2738e4e59d92e5af4a335a258b6
Author: ruipeng <1041589370@qq.com>
Date:   Fri Nov 29 08:57:23 2024 +0800

    gcode文件切片信息显示适配CreatWare切片软件

commit 333a789469445f5cb60d29dc7ed24a2776db3385
Author: zkk <1007518571@qq.com>
Date:   Tue Nov 26 18:03:29 2024 +0800

    修复z高度保存的精度问题
2024-12-19 17:15:56 +08:00
Eric Callahan
e7d3f3e961 job_state: track and store most recent Job Event
Signed-off-by:  Eric Callahan <arksine.codee@gmail.com>
2024-05-03 08:22:41 -04:00
Eric Callahan
44a5600038
job_state; check stored state on disconnect
If Klipper disconnects while printing manually set the state
to "error".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-04 20:15:33 -04:00
Eric Callahan
7de61eb113
klippy_connection: track connection state with an enum
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-16 16:21:21 -05:00
Eric Callahan
6e8b720d17
job_state: combine events into a single handler
Emit a single event where the first argument contains
a "JobEvent" enumeration that describes the particular
event.  This reduces the number of callbacks registered
by JobState consumers and allows them react to multiple
state changes in the same callback.

The individual events remain for compatibility, however
they are deprecated.  Current modules should be updated
to use the "job_state:state_changed" event and new modules
must use this event.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-16 16:21:20 -05:00
Eric Callahan
2a7594fc3b
job_state: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:31:15 -04:00
Eric Callahan
d3bab5de94
klippy_apis: support subscription callbacks
This callback will only fire after a component has requested
a subscription, preventing early updates while the component
is waiting for the subscription request to complete.  It is still
valid for components to register the "server:status_update"
event handler if this behavior is not a concern.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 16:30:00 -04:00
Eric Callahan
0f8638fec7
components: correct imports
All imports must now be relative to work correctly with the
moonraker parent package.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-22 12:16:27 -05:00
Eric Callahan
c48fe7307a
job_state: add layer_changed event
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-11 19:29:36 -04:00
Eric Callahan
430c2550c5
job_state: add logging
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-04-19 06:18:42 -04:00
Eric Callahan
c69ded21b0 job_state: initialize in "klippy_started" event
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-11 08:44:55 -05:00
Eric Callahan
d0c104aceb job_state: initial implementation
This module adds a helper to track Klippy's "print_stats" module.  It
stores the current stats and emits events for changes in job state.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-11-12 10:11:39 -05:00