Skip to content

Commit

Permalink
fix RTCM position
Browse files Browse the repository at this point in the history
  • Loading branch information
paukstelis committed Oct 21, 2024
1 parent e28c956 commit df79098
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions octoprint_gcode_ripper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ def generate_gcode(self):
mina = math.degrees(miny/(wrapdiam/2))
maxa = math.degrees(maxy/(wrapdiam/2))
maxarc = (abs(mina) + abs(maxa))
pre = "DOBANGLE\nDIAM {0}\n".format(wrapdiam)
pre = "RTCM\nDOBANGLE\nDIAM {0}\n".format(wrapdiam)

if self.modifyA and not polar:
pre = pre + "RTCM\nDOMODA\nMAXARC {0:.3f}".format(maxarc)
pre = pre + "DOMODA\nMAXARC {0:.3f}".format(maxarc)

with open(path_on_disk,"w") as newfile:
for line in gcr.generategcode(temp, Rstock=wrapdiam/2, no_variables=True, Wrap=self.mapping, preamble=pre, postamble="STOPBANGLE", FSCALE="None"):
Expand Down
2 changes: 1 addition & 1 deletion octoprint_gcode_ripper/static/js/gcode_ripper.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ $(function() {
self.onDataUpdaterPluginMessage = function(plugin, data) {
if (plugin == 'gcode_ripper' && data.type == 'grbl_state') {
self.zPos(Number.parseFloat(data.z).toFixed(2));
self.calc_diameter() = (Number.parseFloat(self.diameter()) + (self.zPos()*2));
self.calc_diameter = (Number.parseFloat(self.diameter()) + (self.zPos()*2));
//console.log(newDiam);
}
}
Expand Down

0 comments on commit df79098

Please sign in to comment.