Update hexapod.py
This commit is contained in:
parent
3ced88ec84
commit
33a3bf1d68
@ -242,7 +242,6 @@ class Hexapod(Thread):
|
|||||||
try:
|
try:
|
||||||
cmd_string = self.cmd_queue.get(block=False)
|
cmd_string = self.cmd_queue.get(block=False)
|
||||||
print('interrput')
|
print('interrput')
|
||||||
print(cmd_string)
|
|
||||||
except Empty:
|
except Empty:
|
||||||
time.sleep(self.interval)
|
time.sleep(self.interval)
|
||||||
pass
|
pass
|
||||||
@ -284,7 +283,6 @@ class Hexapod(Thread):
|
|||||||
|
|
||||||
def cmd_handler(self, cmd_string):
|
def cmd_handler(self, cmd_string):
|
||||||
data = cmd_string.split(':')[-2]
|
data = cmd_string.split(':')[-2]
|
||||||
print(data)
|
|
||||||
self.current_motion = self.cmd_dict.get(data, self.standby_posture)
|
self.current_motion = self.cmd_dict.get(data, self.standby_posture)
|
||||||
|
|
||||||
self.cmd_queue.task_done()
|
self.cmd_queue.task_done()
|
||||||
@ -294,7 +292,6 @@ class Hexapod(Thread):
|
|||||||
# if self.current_motion is None:
|
# if self.current_motion is None:
|
||||||
try:
|
try:
|
||||||
cmd_string = self.cmd_queue.get(block=False)
|
cmd_string = self.cmd_queue.get(block=False)
|
||||||
print(cmd_string)
|
|
||||||
except Empty:
|
except Empty:
|
||||||
time.sleep(self.interval)
|
time.sleep(self.interval)
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user