diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 21:29:54 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 21:43:33 -0400 |
commit | 07a69df62f7a3470329a3ea0ba1e569ab0e9d0fe (patch) | |
tree | 870b257cebe3e0f4c710c8e3f13917dbabb77bb7 /klippy/mcu.py | |
parent | f8750b142f56ebb1b9dd25a2fdfb5b28d33de57d (diff) | |
download | kutter-07a69df62f7a3470329a3ea0ba1e569ab0e9d0fe.tar.gz kutter-07a69df62f7a3470329a3ea0ba1e569ab0e9d0fe.tar.xz kutter-07a69df62f7a3470329a3ea0ba1e569ab0e9d0fe.zip |
mcu: Fix command restart
Fix omission in commit f8750b14 that broke restarts via Klipper
command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/mcu.py')
-rw-r--r-- | klippy/mcu.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/mcu.py b/klippy/mcu.py index 17e93e0b..98d516fb 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -681,7 +681,7 @@ class MCU: # Attempt reset via config_reset command logging.info("Attempting MCU '%s' config_reset command", self._name) self._is_shutdown = True - self.force_shutdown() + self.do_shutdown(force=True) reactor.pause(reactor.monotonic() + 0.015) self.send(self._config_reset_cmd.encode()) else: @@ -735,8 +735,8 @@ class MCU: self._mcu_tick_stddev) return ' '.join([msg, self._serial.stats(eventtime), self._clocksync.stats(eventtime)]) - def do_shutdown(self): - if self._is_shutdown or self._emergency_stop_cmd is None: + def do_shutdown(self, force=False): + if self._emergency_stop_cmd is None or (self._is_shutdown and not force): return self.send(self._emergency_stop_cmd.encode()) def disconnect(self): |