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
/
DriveDistance.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
index 582cd80b69abb799a89a7b3afdcd56432d22a738..d297e66a1dcb1ecb55445b8291ce089d7d4f24ea 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
@@
-47,12
+47,13
@@
public class DriveDistance extends Command {
this.driveTrain.resetEncoders();
this.driveController.setSetPoint(this.target);
this.zeroAngle = driveTrain.getAngle();
this.driveTrain.resetEncoders();
this.driveController.setSetPoint(this.target);
this.zeroAngle = driveTrain.getAngle();
+ System.out.println("drive " + target);
}
@Override
protected void execute() {
double xVal = gyroP * (driveTrain.getAngle() - zeroAngle);
}
@Override
protected void execute() {
double xVal = gyroP * (driveTrain.getAngle() - zeroAngle);
- double yVal = driveController.calcPID(driveTrain.get
Avg
EncoderDistance());
+ double yVal = driveController.calcPID(driveTrain.get
Left
EncoderDistance());
double leftDrive = yVal - xVal;
double rightDrive = yVal + xVal;
double leftDrive = yVal - xVal;
double rightDrive = yVal + xVal;