Skip to content

Commit

Permalink
Laser-mode fix (#6)
Browse files Browse the repository at this point in the history
* template always false?

* version bump, python3.12 fix for probing regex
  • Loading branch information
paukstelis authored Oct 28, 2024
1 parent 2831c37 commit 02ca481
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions octoprint_latheengraver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def get_extension_tree(self, *args, **kwargs):

def parse_probe(self, line):
#[PRB:-1.000,0.000,-10.705,0.000,0.000:1]
match = re.search(".*:([-]*\d*\.*\d*),\d\.000,([-]*\d*\.*\d*),([-]*\d*\.*\d*).*", line)
match = re.search(r".*:([-]*\d*\.*\d*),\d\.000,([-]*\d*\.*\d*),([-]*\d*\.*\d*).*", line)
self._logger.debug("Parse probe data")
self._logger.debug(line)
matchstr = ''
Expand Down Expand Up @@ -909,7 +909,7 @@ def get_new_A(self, zval, aval):
if calc_Y < 0:
new_A = new_A*-1
local_distance = distance - radius - zval
#self._logger.info("Calc. Y: {0}, Distance: {1}, To Origin: {2}, Degrees: {3}, Zval: {4}".format(calc_Y, distance, to_origin, math.degrees(new_A), zval))
self._logger.debug("Calc. Y: {0}, Distance: {1}, To Origin: {2}, Degrees: {3}, Zval: {4}".format(calc_Y, distance, to_origin, math.degrees(new_A), zval))
return math.degrees(new_A), local_distance

def get_a_profile(self, profile):
Expand Down
6 changes: 3 additions & 3 deletions octoprint_latheengraver/_bgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ def on_event(_plugin, event, payload):
_plugin.get_a_profile(path)

#these should never be on in lasermode
if is_laser_mode(_plugin):
_plugin.template = False
_plugin.track_plugine =False
#if is_laser_mode(_plugin):
# _plugin.template = False
# _plugin.track_plunge =False

if _plugin.autoCooldown:
activate_auto_cooldown(_plugin)
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.17"
plugin_version = "1.0.18"

# 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 02ca481

Please sign in to comment.