aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/skew_correction.py
diff options
context:
space:
mode:
authorGofranChang <36130357+GofranChang@users.noreply.github.com>2025-02-28 02:18:59 +0800
committerGitHub <noreply@github.com>2025-02-27 13:18:59 -0500
commit98068beca0a3bbe8594f309d2fa6152b71baac49 (patch)
tree2c353b35a641c43e3311eabbc56a7e6340d556c2 /klippy/extras/skew_correction.py
parent3c1bf4ccfe374ae71deb111f82c969eff093b8d8 (diff)
downloadkutter-98068beca0a3bbe8594f309d2fa6152b71baac49.tar.gz
kutter-98068beca0a3bbe8594f309d2fa6152b71baac49.tar.xz
kutter-98068beca0a3bbe8594f309d2fa6152b71baac49.zip
skew_correction: Supports retrieving the name of the currently loaded skew correction … (#6821)
Signed-off-by: Zhang Gaofan <zhanggaofan0827@gmail.com>
Diffstat (limited to 'klippy/extras/skew_correction.py')
-rw-r--r--klippy/extras/skew_correction.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/klippy/extras/skew_correction.py b/klippy/extras/skew_correction.py
index f9a29206..6a2cbd29 100644
--- a/klippy/extras/skew_correction.py
+++ b/klippy/extras/skew_correction.py
@@ -20,6 +20,7 @@ class PrinterSkew:
def __init__(self, config):
self.printer = config.get_printer()
self.name = config.get_name()
+ self.current_profile_name = ""
self.toolhead = None
self.xy_factor = 0.
self.xz_factor = 0.
@@ -117,6 +118,7 @@ class PrinterSkew:
def cmd_SKEW_PROFILE(self, gcmd):
if gcmd.get('LOAD', None) is not None:
name = gcmd.get('LOAD')
+ self.current_profile_name = name
prof = self.skew_profiles.get(name)
if prof is None:
gcmd.respond_info(
@@ -156,7 +158,10 @@ class PrinterSkew:
gcmd.respond_info(
"skew_correction: No profile named [%s] to remove"
% (name))
-
+ def get_status(self, eventtime):
+ return {
+ 'current_profile_name': self.current_profile_name
+ }
def load_config(config):
return PrinterSkew(config)