mcu: Add support for commands to send only on a host restart
Add a new "on_restart" parameter to mcu.add_config_cmd() and only send those commands on a host restart that does not involve a micro-controller restart. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -76,8 +76,8 @@ class MCU_stepper:
|
||||
self._oid, self._step_pin, self._dir_pin,
|
||||
self._mcu.seconds_to_clock(min_stop_interval),
|
||||
self._invert_step))
|
||||
self._mcu.add_config_cmd(
|
||||
"reset_step_clock oid=%d clock=0" % (self._oid,), is_init=True)
|
||||
self._mcu.add_config_cmd("reset_step_clock oid=%d clock=0"
|
||||
% (self._oid,), on_restart=True)
|
||||
step_cmd_id = self._mcu.lookup_command_id(
|
||||
"queue_step oid=%c interval=%u count=%hu add=%hi")
|
||||
dir_cmd_id = self._mcu.lookup_command_id(
|
||||
|
||||
Reference in New Issue
Block a user