sets/mindstorms-robot-invetor/gelo: fix missed rename

Did some last minute renaming to fix flake8 but must have missed some.
This commit is contained in:
David Lechner
2023-02-04 17:56:03 -06:00
committed by GitHub
parent 59c84aa332
commit e47c0fca66
@@ -157,9 +157,9 @@ class Gelo:
}
# 90% of full load for all motors
self._near_max_load = 90 * sum([
l.control.limits()[_TORQUE] for l in self._all_legs
]) // 100
self._near_max_load = 90 * sum(
leg.control.limits()[_TORQUE] for leg in self._all_legs
) // 100
self._zero = {
self.back_right: 0,
@@ -272,9 +272,9 @@ class Gelo:
# Adjust the angle of each so that the average of all
# legs is 0 while keeping the relative position of each
# motor.
avg = sum([
l.angle() - offset[l] for leg in self._all_legs
]) // len(self._all_legs)
avg = sum(
leg.angle() - offset[leg] for leg in self._all_legs
) // len(self._all_legs)
for leg in self._all_legs:
leg.reset_angle(leg.angle() - avg)