mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-09 07:56:26 -06:00
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>
This commit is contained in:
parent
d798fae20b
commit
879c45db19
2 changed files with 5 additions and 2 deletions
|
@ -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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue