Improve homing
This commit is contained in:
@@ -69,7 +69,6 @@ class AxidrawSerial(Node):
|
||||
return response
|
||||
|
||||
def go_home(self):
|
||||
self.wait_ready()
|
||||
self.status["motion"] = "busy"
|
||||
if self.status["serial"] == "ready":
|
||||
self.ad.moveto(0,0)
|
||||
@@ -82,9 +81,10 @@ class AxidrawSerial(Node):
|
||||
self.status["motion"] = "ready"
|
||||
|
||||
def wait_ready(self):
|
||||
rate = node.create_rate(2) #2Hz
|
||||
rate = self.create_rate(2) #2Hz
|
||||
while self.status["motion"] != "ready":
|
||||
rate.sleep()
|
||||
pass
|
||||
|
||||
def move_callback(self, msg):
|
||||
self.set_busy()
|
||||
|
||||
Reference in New Issue
Block a user