pause_resume: Do not clobber default state name by accident (#5156)

Previously accidentally used 'default' state name instead of the
stated one ('PAUSE_STATE'). This might collide with user usage of the
SAVE_GCODE_STATE macro.

Signed-off-by: David Grundberg <individ@acc.umu.se>
This commit is contained in:
individ-divided 2022-01-16 19:00:24 +01:00 committed by GitHub
parent babb067b60
commit 538f09a2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class PauseResume:
gcmd.respond_info("Print already paused")
return
self.send_pause_command()
self.gcode.run_script_from_command("SAVE_GCODE_STATE STATE=PAUSE_STATE")
self.gcode.run_script_from_command("SAVE_GCODE_STATE NAME=PAUSE_STATE")
self.is_paused = True
def send_resume_command(self):
if self.sd_paused:
@ -80,7 +80,7 @@ class PauseResume:
return
velocity = gcmd.get_float('VELOCITY', self.recover_velocity)
self.gcode.run_script_from_command(
"RESTORE_GCODE_STATE STATE=PAUSE_STATE MOVE=1 MOVE_SPEED=%.4f"
"RESTORE_GCODE_STATE NAME=PAUSE_STATE MOVE=1 MOVE_SPEED=%.4f"
% (velocity))
self.send_resume_command()
self.is_paused = False