Skip to content

Commit

Permalink
Add setting for stepping mode
Browse files Browse the repository at this point in the history
  • Loading branch information
duk3luk3 committed Dec 22, 2023
1 parent b973587 commit ed190f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion printrun/printcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(self, port = None, baud = None, dtr=None):
self.startcb = None # impl ()
self.endcb = None # impl ()
self.onlinecb = None # impl ()
self.loud = True # emit sent and received lines to terminal
self.loud = False # emit sent and received lines to terminal
self.tcp_streaming_mode = False
self.greetings = ['start', 'Grbl ']
self.wait = 0 # default wait period for send(), send_now()
Expand Down
7 changes: 4 additions & 3 deletions printrun/pronsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
get_home_pos, parse_build_dimensions, parse_temperature_report, \
setup_logging
install_locale('pronterface')
from .settings import Settings, BuildDimensionsSetting
from .settings import Settings, BuildDimensionsSetting, BooleanSetting
from .power import powerset_print_start, powerset_print_stop
from printrun import gcoder
from .rpc import ProntRPC
Expand Down Expand Up @@ -180,6 +180,7 @@ def __init__(self):
self.processing_args = False
self.settings = Settings(self)
self.settings._add(BuildDimensionsSetting("build_dimensions", "200x200x100+0+0+0+0+0+0", _("Build Dimensions:"), _("Dimensions of Build Platform\n & optional offset of origin\n & optional switch position\n\nExamples:\n XXXxYYY\n XXX,YYY,ZZZ\n XXXxYYYxZZZ+OffX+OffY+OffZ\nXXXxYYYxZZZ+OffX+OffY+OffZ+HomeX+HomeY+HomeZ"), "Printer"), self.update_build_dimensions)
self.settings._add(BooleanSetting("stepping_mode", False, "GCode Stepping Mode: When true, will go into paused mode when starting and disable restore on resume"))
self.settings._port_list = self.scanserial
self.update_build_dimensions(None, self.settings.build_dimensions)
self.update_tcp_streaming_mode(None, self.settings.tcp_streaming_mode)
Expand Down Expand Up @@ -1104,7 +1105,7 @@ def do_print(self, l):
self.log(_("Printing %s") % self.filename)
self.log(_("You can monitor the print with the monitor command."))
self.sdprinting = False
really = not (l and l == 'pause')
really = not (l and l == 'pause') and not self.settings.stepping_mode
self.p.startprint(self.fgcode, really_start=really)
if not really:
self.paused = True
Expand Down Expand Up @@ -1140,7 +1141,7 @@ def do_resume(self, l):
self.p.send_now("M24")
return
else:
do_restore = not l or l != 'direct'
do_restore = not l or l != 'direct' or self.settings.stepping_mode
self.p.resume(do_restore)

def help_resume(self):
Expand Down

0 comments on commit ed190f5

Please sign in to comment.