From f5269f214bcfb75f0f5c86824c6c2ef8bcec99ec Mon Sep 17 00:00:00 2001 From: Zhengyu Peng Date: Fri, 17 Dec 2021 07:56:01 -0500 Subject: [PATCH] Update leg.py --- software/rpi/leg.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/software/rpi/leg.py b/software/rpi/leg.py index 4674b2e..cdc99e1 100644 --- a/software/rpi/leg.py +++ b/software/rpi/leg.py @@ -45,12 +45,15 @@ class Leg: [set_angle, self.constraint[junction][0]+self.correction[junction], 0]) self.junction_servos[junction].angle = set_angle + def set_raw_angle(self, junction, angle): + self.junction_servos[junction].angle = angle + def move_junctions(self, angles): self.set_angle(0, angles[0]) self.set_angle(1, angles[1]) self.set_angle(2, angles[2]) def reset(self): - self.set_angle(0, 90) - self.set_angle(1, 90) - self.set_angle(2, 90) + self.set_raw_angle(0, 90) + self.set_raw_angle(1, 90) + self.set_raw_angle(2, 90)