X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fdriving%2FTurnForAngle.java;h=717f15151d5b8512218b2e865acade3403cd9ced;hp=867f5eddf4d5865601fe068cec7739edde4c3732;hb=c726d04ade36dead56cd4b2f1b91a341ce90bdb6;hpb=7cd65a82e59374ba6cae30c6f67e358717f7ee48 diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java b/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java index 867f5ed..717f151 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java @@ -35,7 +35,6 @@ public class TurnForAngle extends Command { this.direction = direction; this.maxTimeOut = maxTimeOut; this.target = Math.abs(angle); - this.zeroAngle = driveTrain.getAngle(); this.gyroP = driveTrain.turnP; this.gyroI = driveTrain.turnI; @@ -50,6 +49,7 @@ public class TurnForAngle extends Command { protected void initialize() { this.driveTrain.resetEncoders(); this.gyroController.setSetPoint(this.target); + this.zeroAngle = driveTrain.getAngle(); } @Override