diff options
Diffstat (limited to 'klippy/extras/z_tilt.py')
-rw-r--r-- | klippy/extras/z_tilt.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py index 4e748dd0..04b7d4c1 100644 --- a/klippy/extras/z_tilt.py +++ b/klippy/extras/z_tilt.py @@ -9,6 +9,8 @@ import probe, mathutil class ZTilt: def __init__(self, config): self.printer = config.get_printer() + self.printer.register_event_handler("klippy:connect", + self.handle_connect) z_positions = config.get('z_positions').split('\n') try: z_positions = [line.split(',', 1) @@ -27,9 +29,6 @@ class ZTilt: self.gcode.register_command( 'Z_TILT_ADJUST', self.cmd_Z_TILT_ADJUST, desc=self.cmd_Z_TILT_ADJUST_help) - def printer_state(self, state): - if state == 'connect': - self.handle_connect() def handle_connect(self): kin = self.printer.lookup_object('toolhead').get_kinematics() z_steppers = kin.get_steppers('Z') |