Skip to content

Commit

Permalink
Merge pull request #770 from CptanPanic/touch-zero
Browse files Browse the repository at this point in the history
Added option to setting plunge depth of Zaxis touch probe.
  • Loading branch information
MaslowCommunityGardenRobot authored Sep 5, 2018
2 parents 405c576 + 95b12a5 commit a42d628
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Settings/maslowSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@
],
"Advanced Settings":
[
{
"type": "string",
"title": "Max touch Z-axis plunge",
"desc": "Max depth the z axis should plunge in order to find the touch probe",
"key": "maxTouchProbePlungeDistance",
"default": 0.0,
},
{
"type": "string",
"title": "Encoder Steps per Revolution",
Expand Down
6 changes: 4 additions & 2 deletions UIElements/zAxisPopupContent.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ def touchZero(self):
Probe for Zero Z
'''
self.setMachineUnits()
plungeDepth = self.data.config.get('Advanced Settings', 'maxTouchProbePlungeDistance')

if self.data.units == "INCHES":
self.data.gcode_queue.put("G38.2 Z-.2 F2") #Only go down 0.2 inches...
self.data.gcode_queue.put("G20 G90 G38.2 Z-" + plungeDepth + " F1 G20 G90 M02")
else:
self.data.gcode_queue.put("G38.2 Z-5 F50") #Or 5mm.
self.data.gcode_queue.put("G21 G90 G38.2 Z-" + plungeDepth + " F1 G21 G90 M02")
self.resetMachineUnits()


Expand Down
2 changes: 1 addition & 1 deletion groundcontrol.kv
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@
size_hint_y: 0.2
text: "Touch Zero"
on_release: root.touchZero()
disabled: True
disabled: False
Button:
text: "Lower"
on_release: root.zIn()
Expand Down

0 comments on commit a42d628

Please sign in to comment.