projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix stuff
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
driving
/
TurnForAngle.java
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 f9f5c7f0e285676a21b0548baa6d3a80df75879c..44434c694531aa65751e95f307fe740ffbf1378a 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java
@@
-35,11
+35,10
@@
public class TurnForAngle extends Command {
this.direction = direction;
this.maxTimeOut = maxTimeOut;
this.target = Math.abs(angle);
this.direction = direction;
this.maxTimeOut = maxTimeOut;
this.target = Math.abs(angle);
- this.zeroAngle = driveTrain.getAngle();
- this.gyroP = driveTrain.
defaultGyro
P;
- this.gyroI = driveTrain.
defaultGyro
I;
- this.gyroD = driveTrain.
defaultGyro
D;
+ this.gyroP = driveTrain.
turn
P;
+ this.gyroI = driveTrain.
turn
I;
+ this.gyroD = driveTrain.
turn
D;
this.gyroController = new PIDController(this.gyroP, this.gyroI, this.gyroD);
this.gyroController.setDoneRange(1);
this.gyroController = new PIDController(this.gyroP, this.gyroI, this.gyroD);
this.gyroController.setDoneRange(1);
@@
-50,6
+49,7
@@
public class TurnForAngle extends Command {
protected void initialize() {
this.driveTrain.resetEncoders();
this.gyroController.setSetPoint(this.target);
protected void initialize() {
this.driveTrain.resetEncoders();
this.gyroController.setSetPoint(this.target);
+ this.zeroAngle = driveTrain.getAngle();
}
@Override
}
@Override
@@
-70,6
+70,7
@@
public class TurnForAngle extends Command {
}
this.driveTrain.setMotorValues(leftDrive, rightDrive);
}
this.driveTrain.setMotorValues(leftDrive, rightDrive);
+ System.out.println(this.driveTrain.getAngle() - this.zeroAngle);
}
@Override
}
@Override