mirror of https://github.com/Desuuuu/klipper.git
mcu: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
fa25986adc
commit
2978771ce5
|
@ -657,7 +657,8 @@ class MCU:
|
||||||
for i, cmd in enumerate(cmdlist):
|
for i, cmd in enumerate(cmdlist):
|
||||||
cmdlist[i] = pin_resolver.update_command(cmd)
|
cmdlist[i] = pin_resolver.update_command(cmd)
|
||||||
# Calculate config CRC
|
# Calculate config CRC
|
||||||
config_crc = zlib.crc32('\n'.join(self._config_cmds)) & 0xffffffff
|
encoded_config = '\n'.join(self._config_cmds).encode()
|
||||||
|
config_crc = zlib.crc32(encoded_config) & 0xffffffff
|
||||||
self.add_config_cmd("finalize_config crc=%d" % (config_crc,))
|
self.add_config_cmd("finalize_config crc=%d" % (config_crc,))
|
||||||
if prev_crc is not None and config_crc != prev_crc:
|
if prev_crc is not None and config_crc != prev_crc:
|
||||||
self._check_restart("CRC mismatch")
|
self._check_restart("CRC mismatch")
|
||||||
|
|
Loading…
Reference in New Issue