mirror of
https://github.com/pybricks/pybricks-projects.git
synced 2026-07-28 04:06:07 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user