get calibration data from config

master
Zhengyu Peng 3 years ago
parent 174306a092
commit 665845ccfb

@ -117,32 +117,32 @@ class Hexapod(Thread):
self.leg_0 = Leg(0,
[self.pca_left.servo[15], self.pca_left.servo[14],
self.pca_left.servo[13]],
correction=[4, 6, 2])
correction=self.config.get('leg0Offset', [0, 0, 0]))
# center right
self.leg_1 = Leg(1,
[self.pca_left.servo[8], self.pca_left.servo[4],
self.pca_left.servo[11]],
correction=[0, 8, -6])
correction=self.config.get('leg1Offset', [0, 0, 0]))
# rear right
self.leg_2 = Leg(2,
[self.pca_left.servo[0], self.pca_left.servo[1],
self.pca_left.servo[2]],
correction=[2, 8, -1])
correction=self.config.get('leg2Offset', [0, 0, 0]))
# rear left
self.leg_3 = Leg(3,
[self.pca_right.servo[15], self.pca_right.servo[14],
self.pca_right.servo[13]],
correction=[-3, 10, -8])
correction=self.config.get('leg3Offset', [0, 0, 0]))
# center left
self.leg_4 = Leg(4,
[self.pca_right.servo[7], self.pca_right.servo[11],
self.pca_right.servo[6]],
correction=[-6, 2, -4])
correction=self.config.get('leg4Offset', [0, 0, 0]))
# front left
self.leg_5 = Leg(5,
[self.pca_right.servo[0], self.pca_right.servo[2],
self.pca_right.servo[5]],
correction=[0, 0, -10])
correction=self.config.get('leg5Offset', [0, 0, 0]))
# self.leg_0.reset(True)
# self.leg_1.reset(True)

Loading…
Cancel
Save