Update hexapod.py
This commit is contained in:
parent
46ab42e8c0
commit
65370b01a8
@ -333,6 +333,11 @@ class Hexapod(Thread):
|
|||||||
angle = float(data_array[3])
|
angle = float(data_array[3])
|
||||||
if op == 'angle':
|
if op == 'angle':
|
||||||
self.legs[leg_idx].set_angle(joint_idx, angle)
|
self.legs[leg_idx].set_angle(joint_idx, angle)
|
||||||
|
elif op == 'offset':
|
||||||
|
config_str = 'leg'+str(leg_idx)+'Offset'
|
||||||
|
self.legs[leg_idx].correction[joint_idx] = angle
|
||||||
|
self.config[config_str] = self.legs[leg_idx].correction
|
||||||
|
self.legs[leg_idx].reset(calibrated=True)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user