mcu: Make sure all endstop objects are disabled on a reconnect

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-12-05 12:13:09 -05:00
parent bc9cbc8133
commit 7932de11a7
1 changed files with 3 additions and 0 deletions

View File

@ -153,6 +153,9 @@ class MCU_endstop:
self._mcu.add_config_cmd(
"config_end_stop oid=%d pin=%s pull_up=%d stepper_count=%d" % (
self._oid, self._pin, self._pullup, len(self._steppers)))
self._mcu.add_config_cmd(
"end_stop_home oid=%d clock=0 sample_ticks=0 sample_count=0"
" rest_ticks=0 pin_value=0" % (self._oid,), is_init=True)
for i, s in enumerate(self._steppers):
self._mcu.add_config_cmd(
"end_stop_set_stepper oid=%d pos=%d stepper_oid=%d" % (