mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 13:04:05 -06:00
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>
This commit is contained in:
parent
69dcda1696
commit
d881171739
3 changed files with 24 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue