aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/mcu.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-05-28 11:44:42 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-05-29 10:57:29 -0400
commit879c45db191251af2a00e75bf6ba89ab876c2fad (patch)
treeb440b161cd6ccfa8c97466fbd78688f6f3318452 /klippy/mcu.py
parentd798fae20b1cd87396ea884de737aa7f3e359193 (diff)
downloadkutter-879c45db191251af2a00e75bf6ba89ab876c2fad.tar.gz
kutter-879c45db191251af2a00e75bf6ba89ab876c2fad.tar.xz
kutter-879c45db191251af2a00e75bf6ba89ab876c2fad.zip
mcu: Do not automatically restart MCU with new config if it is shutdown
Normally, the MCU is restarted on a config change. However, that should not be done automatically if the MCU is in a shutdown state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/mcu.py')
-rw-r--r--klippy/mcu.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/mcu.py b/klippy/mcu.py
index 7f1f7f51..2209ce4e 100644
--- a/klippy/mcu.py
+++ b/klippy/mcu.py
@@ -567,6 +567,9 @@ class MCU:
if start_reason == 'firmware_restart':
raise error("Failed automated reset of MCU '%s'" % (self._name,))
if self._config_crc != config_params['crc']:
+ if config_params['is_shutdown']:
+ raise error("Can not update MCU '%s' config as it is shutdown"
+ % (self._name,))
self._check_restart("CRC mismatch")
raise error("MCU '%s' CRC does not match config" % (self._name,))
move_count = config_params['move_count']