diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2023-01-13 12:42:14 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2023-02-22 11:34:36 -0500 |
commit | d8811717391cb9ac11eaebf342387edd7404fdd0 (patch) | |
tree | 2fd2c0f9030f5c7cd88f5156934952cd413b158f /klippy/stepper.py | |
parent | 69dcda1696a04e303f70632a09869f3cc57bb94f (diff) | |
download | kutter-d8811717391cb9ac11eaebf342387edd7404fdd0.tar.gz kutter-d8811717391cb9ac11eaebf342387edd7404fdd0.tar.xz kutter-d8811717391cb9ac11eaebf342387edd7404fdd0.zip |
mcu: Move lookup_command_tag() to CommandWrapper class
Use mcu.lookup_command().get_command_tag() instead of
mcu.lookup_command_tag(). This improves error reporting on a protocol
mismatch. It also enables support for a msgtag that is negative.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r-- | klippy/stepper.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py index ad7d1282..0f8c0275 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -89,12 +89,12 @@ class MCU_stepper: invert_step, step_pulse_ticks)) self._mcu.add_config_cmd("reset_step_clock oid=%d clock=0" % (self._oid,), on_restart=True) - step_cmd_tag = self._mcu.lookup_command_tag( - "queue_step oid=%c interval=%u count=%hu add=%hi") - dir_cmd_tag = self._mcu.lookup_command_tag( - "set_next_step_dir oid=%c dir=%c") - self._reset_cmd_tag = self._mcu.lookup_command_tag( - "reset_step_clock oid=%c clock=%u") + step_cmd_tag = self._mcu.lookup_command( + "queue_step oid=%c interval=%u count=%hu add=%hi").get_command_tag() + dir_cmd_tag = self._mcu.lookup_command( + "set_next_step_dir oid=%c dir=%c").get_command_tag() + self._reset_cmd_tag = self._mcu.lookup_command( + "reset_step_clock oid=%c clock=%u").get_command_tag() self._get_position_cmd = self._mcu.lookup_query_command( "stepper_get_position oid=%c", "stepper_position oid=%c pos=%i", oid=self._oid) |