mirror of https://github.com/Desuuuu/klipper.git
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:
parent
babb067b60
commit
538f09a2da
|
@ -63,7 +63,7 @@ class PauseResume:
|
||||||
gcmd.respond_info("Print already paused")
|
gcmd.respond_info("Print already paused")
|
||||||
return
|
return
|
||||||
self.send_pause_command()
|
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
|
self.is_paused = True
|
||||||
def send_resume_command(self):
|
def send_resume_command(self):
|
||||||
if self.sd_paused:
|
if self.sd_paused:
|
||||||
|
@ -80,7 +80,7 @@ class PauseResume:
|
||||||
return
|
return
|
||||||
velocity = gcmd.get_float('VELOCITY', self.recover_velocity)
|
velocity = gcmd.get_float('VELOCITY', self.recover_velocity)
|
||||||
self.gcode.run_script_from_command(
|
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))
|
% (velocity))
|
||||||
self.send_resume_command()
|
self.send_resume_command()
|
||||||
self.is_paused = False
|
self.is_paused = False
|
||||||
|
|
Loading…
Reference in New Issue