Skip to content

Commit

Permalink
set queue_B to grblB in queuing
Browse files Browse the repository at this point in the history
  • Loading branch information
paukstelis committed Sep 4, 2024
1 parent e53fa57 commit d36d934
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions octoprint_latheengraver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,8 @@ def hook_gcode_queuing(self, comm_instance, phase, cmd, cmd_type, gcode, tags, *
assembly = {"X": None, "Z": None, "A": None, "B": None, "F": None, "S": None}
track_plunge = False
orig_cmd = cmd
#this is needed because B axis moves may not be emitted
#self.queue_B = self.grblB
#this is needed because B axis moves may not be emitted.
self.queue_B = self.grblB
newcmd = ''
match_cmd = self.match_cmd.match(cmd)
gcommands = []
Expand Down Expand Up @@ -882,7 +882,7 @@ def assemble_command(self, newcmd, assembly):
cmd = newcmd
for key, value in assembly.items():
if value:
cmd = cmd+" {0}{1:.4f}".format(str(key), value)
cmd = cmd+"{0}{1:.4f}".format(str(key), value)
return cmd

def get_new_A(self, zval, aval):
Expand Down
25 changes: 13 additions & 12 deletions octoprint_latheengraver/_bgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,17 @@ def on_event(_plugin, event, payload):
add_notifications(_plugin, ["Pgm Begin"])
# threading.Thread(target=send_command_now, args=(_plugin._printer, _plugin._logger, "?")).start()
_plugin._printer.commands("?", force=True)
# reset our rate/position overrides
_plugin.feedRate = 0
_plugin.plungeRate = 0
_plugin.powerRate = 0
_plugin.queue_X = _plugin.grblX
_plugin.queue_Z = _plugin.grblZ
_plugin.queue_A = _plugin.grblA
_plugin.queue_B = _plugin.grblB
_plugin.queue_S = 0.0
_plugin.queue_F = 0.0
_plugin.bypass_queuing = False
return

# 'PrintStarted'
Expand All @@ -299,17 +310,7 @@ def on_event(_plugin, event, payload):
_plugin._printer.cancel_print()
return

# reset our rate/position overrides
_plugin.feedRate = 0
_plugin.plungeRate = 0
_plugin.powerRate = 0
_plugin.queue_X = _plugin.grblX
_plugin.queue_Z = _plugin.grblZ
_plugin.queue_A = _plugin.grblA
_plugin.queue_B = _plugin.grblB
_plugin.queue_S = 0.0
_plugin.queue_F = 0.0
_plugin.bypass_queuing = False


_plugin.grblState = "Run"
_plugin._plugin_manager.send_plugin_message(_plugin._identifier, dict(type="grbl_state", state="Run"))
Expand Down Expand Up @@ -352,7 +353,7 @@ def on_event(_plugin, event, payload):
_plugin.queue_X = 0.0
_plugin.queue_Z = 0.0
_plugin.queue_A = 0.0
_plugin.queue_B = 0.0
_plugin.queue_B = _plugin.grblB
_plugin.bypass_queuing = False
return

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "LatheEngraver Support"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.0.12"
plugin_version = "1.0.13"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit d36d934

Please sign in to comment.