Skip to content

Commit

Permalink
add RESTART parameter for SAVE_CONFIG command. default is 1(restart k…
Browse files Browse the repository at this point in the history
…lipper), 0 is not restart.
  • Loading branch information
GuoGeTiertime committed Jan 18, 2024
1 parent 11195c3 commit f96f695
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions klippy/configfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,5 +419,9 @@ def cmd_SAVE_CONFIG(self, gcmd):
msg = "Unable to write config file during SAVE_CONFIG"
logging.exception(msg)
raise gcode.error(msg)
restartflag = gcmd.get_int('RESTART', 1)
logging.info("Restart flag: %d", restartflag)
if restartflag == 0:
return
# Request a restart
gcode.request_restart('restart')

0 comments on commit f96f695

Please sign in to comment.