skew_correction: Register during "connect" phase instead of "ready" phase
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
20245d2e46
commit
3390088d3a
|
@ -26,8 +26,8 @@ class PrinterSkew:
|
||||||
self.yz_factor = 0.
|
self.yz_factor = 0.
|
||||||
self.skew_profiles = {}
|
self.skew_profiles = {}
|
||||||
self._load_storage(config)
|
self._load_storage(config)
|
||||||
self.printer.register_event_handler("klippy:ready",
|
self.printer.register_event_handler("klippy:connect",
|
||||||
self._handle_ready)
|
self._handle_connect)
|
||||||
self.next_transform = None
|
self.next_transform = None
|
||||||
gcode = self.printer.lookup_object('gcode')
|
gcode = self.printer.lookup_object('gcode')
|
||||||
gcode.register_command('GET_CURRENT_SKEW', self.cmd_GET_CURRENT_SKEW,
|
gcode.register_command('GET_CURRENT_SKEW', self.cmd_GET_CURRENT_SKEW,
|
||||||
|
@ -39,7 +39,7 @@ class PrinterSkew:
|
||||||
desc=self.cmd_SET_SKEW_help)
|
desc=self.cmd_SET_SKEW_help)
|
||||||
gcode.register_command('SKEW_PROFILE', self.cmd_SKEW_PROFILE,
|
gcode.register_command('SKEW_PROFILE', self.cmd_SKEW_PROFILE,
|
||||||
desc=self.cmd_SKEW_PROFILE_help)
|
desc=self.cmd_SKEW_PROFILE_help)
|
||||||
def _handle_ready(self):
|
def _handle_connect(self):
|
||||||
gcode_move = self.printer.lookup_object('gcode_move')
|
gcode_move = self.printer.lookup_object('gcode_move')
|
||||||
self.next_transform = gcode_move.set_move_transform(self, force=True)
|
self.next_transform = gcode_move.set_move_transform(self, force=True)
|
||||||
def _load_storage(self, config):
|
def _load_storage(self, config):
|
||||||
|
|
Loading…
Reference in New Issue