diff options
Diffstat (limited to 'src/DumbWalkAnimation.java')
-rw-r--r-- | src/DumbWalkAnimation.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/DumbWalkAnimation.java b/src/DumbWalkAnimation.java index 7ff44d1..5dc2ac1 100644 --- a/src/DumbWalkAnimation.java +++ b/src/DumbWalkAnimation.java @@ -8,10 +8,16 @@ public class DumbWalkAnimation implements WalkAnimation { private double robot_pos_meters; + private final double legLength; + + DumbWalkAnimation(float legTopLength, float legBottomLength) { + this.legLength = legTopLength + legBottomLength; + } /** * Sets the new position for the robot. */ + @Override public void updatePosition(double pos) { this.robot_pos_meters = pos; } @@ -35,6 +41,7 @@ public class DumbWalkAnimation implements WalkAnimation { return 75.0 + Math.abs(Math.cos(getTime()) * 90.0); } + @Override public double getKneeAngleRight() { return getKneeAngleLeft(); } @@ -50,4 +57,9 @@ public class DumbWalkAnimation implements WalkAnimation { // static non-moving arms. return 0; } + + @Override + public double getBottomOffset() { + return legLength; + } } |