aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorRobert Konklewski <nythil@gmail.com>2019-03-21 15:37:28 +0100
committerKevinOConnor <kevin@koconnor.net>2019-03-21 10:37:28 -0400
commit6f91574cd9c6c84cd3dee3633cf9664d3f2026cf (patch)
tree91dabaa85af6254153b64957e4c777467216f307 /klippy/extras
parentd76658756ebbd1808774b475ca6e4367ec70b17e (diff)
downloadkutter-6f91574cd9c6c84cd3dee3633cf9664d3f2026cf.tar.gz
kutter-6f91574cd9c6c84cd3dee3633cf9664d3f2026cf.tar.xz
kutter-6f91574cd9c6c84cd3dee3633cf9664d3f2026cf.zip
menu: Show current positions based on gcode positions (#1389)
menu: Show current positions based on gcode positions Added "move_[xyze]pos" properties to the "gcode" object for use in menus. The new properties track the toolhead's position in gcode coordinates, taking gcode and bed leveling offsets into account. This position is equal to the value returned by M114 gcode. Changes the move menus to show current position based on gcode position. This allows gcode offsets and bed leveling offsets to be taken into account, and prevents unexpected toolhead movements when moving it using the menu. Signed-off-by: Robert Konklewski <nythil@gmail.com>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/display/menu.cfg72
1 files changed, 49 insertions, 23 deletions
diff --git a/klippy/extras/display/menu.cfg b/klippy/extras/display/menu.cfg
index 1e9c12dc..3429e49e 100644
--- a/klippy/extras/display/menu.cfg
+++ b/klippy/extras/display/menu.cfg
@@ -222,30 +222,36 @@ items:
[menu __control __move_10mm __axis_x]
type: input
name: "X:{0:05.1f} "
-parameter: toolhead.xpos
+parameter: gcode.move_xpos
input_min: 0
input_max: 200.0
input_step: 10.0
-gcode: G1 X{0:.1f}
+gcode:
+ G90
+ G1 X{0:.1f}
[menu __control __move_10mm __axis_y]
type: input
name: "Y:{0:05.1f} "
-parameter: toolhead.ypos
+parameter: gcode.move_ypos
input_min: 0
input_max: 200.0
input_step: 10.0
-gcode: G1 Y{0:.1f}
+gcode:
+ G90
+ G1 Y{0:.1f}
[menu __control __move_10mm __axis_z]
type: input
enable: !toolhead.is_printing
name: "Move Z:{0:05.1f}"
-parameter: toolhead.zpos
+parameter: gcode.move_zpos
input_min: 0
input_max: 200.0
input_step: 10.0
-gcode: G1 Z{0:.1f}
+gcode:
+ G90
+ G1 Z{0:.1f}
[menu __control __move_10mm __axis_e]
type: input
@@ -255,7 +261,9 @@ parameter: 0
input_min: -50.0
input_max: 50.0
input_step: 10.0
-gcode: G1 E{0:.1f} F240
+gcode:
+ M83
+ G1 E{0:.1f} F240
### menu move 1mm ###
[menu __control __move_1mm]
@@ -270,30 +278,36 @@ items:
[menu __control __move_1mm __axis_x]
type: input
name: "X:{0:05.1f} "
-parameter: toolhead.xpos
+parameter: gcode.move_xpos
input_min: 0
input_max: 200.0
input_step: 1.0
-gcode: G1 X{0:.1f}
+gcode:
+ G90
+ G1 X{0:.1f}
[menu __control __move_1mm __axis_y]
type: input
name: "Y:{0:05.1f} "
-parameter: toolhead.ypos
+parameter: gcode.move_ypos
input_min: 0
input_max: 200.0
input_step: 1.0
-gcode: G1 Y{0:.1f}
+gcode:
+ G90
+ G1 Y{0:.1f}
[menu __control __move_1mm __axis_z]
type: input
enable: !toolhead.is_printing
name: "Move Z:{0:05.1f}"
-parameter: toolhead.zpos
+parameter: gcode.move_zpos
input_min: 0
input_max: 200.0
input_step: 1.0
-gcode: G1 Z{0:.1f}
+gcode:
+ G90
+ G1 Z{0:.1f}
[menu __control __move_1mm __axis_e]
type: input
@@ -303,7 +317,9 @@ parameter: 0
input_min: -50.0
input_max: 50.0
input_step: 1.0
-gcode: G1 E{0:.1f} F240
+gcode:
+ M83
+ G1 E{0:.1f} F240
### menu move 0.1mm ###
[menu __control __move_01mm]
@@ -318,30 +334,36 @@ items:
[menu __control __move_01mm __axis_x]
type: input
name: "X:{0:05.1f} "
-parameter: toolhead.xpos
+parameter: gcode.move_xpos
input_min: 0
input_max: 200.0
input_step: 0.1
-gcode: G1 X{0:.1f}
+gcode:
+ G90
+ G1 X{0:.1f}
[menu __control __move_01mm __axis_y]
type: input
name: "Y:{0:05.1f} "
-parameter: toolhead.ypos
+parameter: gcode.move_ypos
input_min: 0
input_max: 200.0
input_step: 0.1
-gcode: G1 Y{0:.1f}
+gcode:
+ G90
+ G1 Y{0:.1f}
[menu __control __move_01mm __axis_z]
type: input
enable: !toolhead.is_printing
name: "Move Z:{0:05.1f}"
-parameter: toolhead.zpos
+parameter: gcode.move_zpos
input_min: 0
input_max: 200.0
input_step: 0.1
-gcode: G1 Z{0:.1f}
+gcode:
+ G90
+ G1 Z{0:.1f}
[menu __control __move_01mm __axis_e]
type: input
@@ -351,7 +373,9 @@ parameter: 0
input_min: -50.0
input_max: 50.0
input_step: 0.1
-gcode: G1 E{0:.1f} F240
+gcode:
+ M83
+ G1 E{0:.1f} F240
### menu temperature ###
[menu __temp]
@@ -542,9 +566,11 @@ gcode:
[menu __filament __feed]
type: input
name: Feed Filament: {0:.1f}
-parameter: toolhead.epos
+parameter: 0
input_step: 0.1
-gcode: G1 E{0:.1f} F30
+gcode:
+ M83
+ G1 E{0:.1f} F30
### menu prepare ###
[menu __prepare]