PanelDue: Make checksums optional
Some displays which emulate PD firmware do not use checksums. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
7a013a42f7
commit
346c3ad2a0
|
@ -139,6 +139,7 @@ class PanelDue:
|
|||
self.last_gcode_response = None
|
||||
self.current_file = ""
|
||||
self.file_metadata = {}
|
||||
self.enable_checksum = config.getboolean('enable_checksum', True)
|
||||
|
||||
# Initialize tracked state.
|
||||
self.printer_state = {
|
||||
|
@ -308,6 +309,7 @@ class PanelDue:
|
|||
await self.klippy_apis.emergency_stop()
|
||||
return
|
||||
|
||||
if self.enable_checksum:
|
||||
# Get line number
|
||||
line_index = line.find(' ')
|
||||
try:
|
||||
|
@ -341,6 +343,8 @@ class PanelDue:
|
|||
raise PanelDueError(msg)
|
||||
|
||||
await self._run_gcode(line[line_index+1:cs_index])
|
||||
else:
|
||||
await self._run_gcode(line)
|
||||
|
||||
async def _run_gcode(self, script):
|
||||
# Execute the gcode. Check for special RRF gcodes that
|
||||
|
|
Loading…
Reference in New Issue