Commit 574ed62d authored by Guillaume Seguin's avatar Guillaume Seguin

Fix mini controls, specify speed for move-to-center button

parent 104948d6
...@@ -407,7 +407,7 @@ class XYButtonsMini(XYButtons): ...@@ -407,7 +407,7 @@ class XYButtonsMini(XYButtons):
0: "x", 0: "x",
1: "z", 1: "z",
2: "y", 2: "y",
3: "xy", 3: "center",
} }
def bind_events(self): def bind_events(self):
......
...@@ -587,7 +587,8 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -587,7 +587,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
elif axis == "center": elif axis == "center":
center_x = self.build_dimensions_list[0] / 2 + self.build_dimensions_list[3] center_x = self.build_dimensions_list[0] / 2 + self.build_dimensions_list[3]
center_y = self.build_dimensions_list[1] / 2 + self.build_dimensions_list[4] center_y = self.build_dimensions_list[1] / 2 + self.build_dimensions_list[4]
self.onecmd('G0 X%d Y%d' % (center_x, center_y)) feed = self.settings.xy_feedrate
self.onecmd('G0 X%s Y%s F%s' % (center_x, center_y, feed))
else: else:
return return
self.p.send_now('M114') self.p.send_now('M114')
...@@ -611,7 +612,6 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -611,7 +612,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
if new_y < self.build_dimensions_list[4] or new_y > self.build_dimensions_list[1] + self.build_dimensions_list[4]: if new_y < self.build_dimensions_list[4] or new_y > self.build_dimensions_list[1] + self.build_dimensions_list[4]:
self.clamped_move_message() self.clamped_move_message()
return return
self.onecmd('move Y %s' % y)
else: else:
return return
self.p.send_now('M114') self.p.send_now('M114')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment