diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-03-12 12:08:01 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-03-12 12:08:01 -0400 |
commit | 680a2292554f18f287859a5045e2921cb354ec44 (patch) | |
tree | 73d5a0c923f0fa9e3367d0a7aa2918226598d378 /src/org/usfirst/frc/team4272/robot2017/Autonomous.java | |
parent | 0018460337ece50b16263bdd62311e8cda11dbd2 (diff) |
move the axleWidth constant from Autonomous to HwRobot.
Diffstat (limited to 'src/org/usfirst/frc/team4272/robot2017/Autonomous.java')
-rw-r--r-- | src/org/usfirst/frc/team4272/robot2017/Autonomous.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2017/Autonomous.java b/src/org/usfirst/frc/team4272/robot2017/Autonomous.java index 2669205..3f6b7b4 100644 --- a/src/org/usfirst/frc/team4272/robot2017/Autonomous.java +++ b/src/org/usfirst/frc/team4272/robot2017/Autonomous.java @@ -145,7 +145,6 @@ public class Autonomous { } } - private static final double axleWidth = 2; // in feet private static Command driveDistance(HwRobot robot, double speed, double dist) { return new DriveDistance(robot, 0.2, speed, dist, @@ -153,8 +152,8 @@ public class Autonomous { } private static Command turnRadians(HwRobot robot, double speed, double rad) { return new DriveDistance(robot, 0.6, - speed, Math.copySign(rad*axleWidth/2, rad), - speed, Math.copySign(rad*axleWidth/2, -rad)); + speed, Math.copySign(rad*robot.axleWidth/2, rad), + speed, Math.copySign(rad*robot.axleWidth/2, -rad)); } private static Command turnDegrees(HwRobot robot, double speed, double deg) { return turnRadians(robot, speed, deg * Math.PI/180); |