projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
229ff61
)
change speed constant to be used for maxTimeOut
author
Eric Sandoval
<harpnart@gmail.com>
Sat, 11 Feb 2017 04:37:45 +0000
(20:37 -0800)
committer
Eric Sandoval
<harpnart@gmail.com>
Sun, 19 Feb 2017 18:46:40 +0000
(10:46 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/Robot.java
b/src/org/usfirst/frc/team3501/robot/Robot.java
index 6f313c4dda283274f774332aea697f58eb448838..0d736310e1dadd5cbd7fc42c45a59c99b2fae843 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Robot.java
+++ b/
src/org/usfirst/frc/team3501/robot/Robot.java
@@
-26,7
+26,7
@@
public class Robot extends IterativeRobot {
SmartDashboard.putNumber(driveTrain.DRIVE_I_Val, 0);
SmartDashboard.putNumber(driveTrain.DRIVE_D_Val, 0);
SmartDashboard.putNumber(driveTrain.DRIVE_TARGET_DIST, 50);
SmartDashboard.putNumber(driveTrain.DRIVE_I_Val, 0);
SmartDashboard.putNumber(driveTrain.DRIVE_D_Val, 0);
SmartDashboard.putNumber(driveTrain.DRIVE_TARGET_DIST, 50);
- SmartDashboard.putNumber(driveTrain.
DRIVE_MOTOR_VAL, 0.5
);
+ SmartDashboard.putNumber(driveTrain.
MAX_TIME_OUT, 10
);
SmartDashboard.putNumber(driveTrain.GYRO_P_Val, 0);
SmartDashboard.putNumber(driveTrain.GYRO_I_Val, 0);
SmartDashboard.putNumber(driveTrain.GYRO_P_Val, 0);
SmartDashboard.putNumber(driveTrain.GYRO_I_Val, 0);
@@
-70,9
+70,9
@@
public class Robot extends IterativeRobot {
double gyroD = SmartDashboard.getNumber(driveTrain.GYRO_D_Val,
driveTrain.PID_ERROR);
double gyroD = SmartDashboard.getNumber(driveTrain.GYRO_D_Val,
driveTrain.PID_ERROR);
- double
S
etpoint = SmartDashboard.getNumber(driveTrain.DRIVE_TARGET_DIST,
+ double
s
etpoint = SmartDashboard.getNumber(driveTrain.DRIVE_TARGET_DIST,
driveTrain.PID_ERROR);
driveTrain.PID_ERROR);
- double
Speed = SmartDashboard.getNumber(driveTrain.DRIVE_MOTOR_VAL
,
+ double
maxTimeOut = SmartDashboard.getNumber(driveTrain.MAX_TIME_OUT
,
driveTrain.PID_ERROR);
driveTrain.getDriveController().setName("Drive");
driveTrain.PID_ERROR);
driveTrain.getDriveController().setName("Drive");
@@
-81,7
+81,7
@@
public class Robot extends IterativeRobot {
driveTrain.getGyroController().setConstants(gyroP, gyroI, gyroD);
driveTrain.getGyroController().setConstants(gyroP, gyroI, gyroD);
- Scheduler.getInstance().add(new DriveDistance(
Setpoint, Speed
));
+ Scheduler.getInstance().add(new DriveDistance(
setpoint, maxTimeOut
));
}
@Override
}
@Override
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 bd923a2af73427ffa69ad842431c1736feb4a12e..c60b877c8742a2c7a1badc5fd640d6f7d60d3e16 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
@@
-30,7
+30,7
@@
public class DriveDistance extends Command {
this.driveController = driveTrain.getDriveController();
this.driveController.setDoneRange(0.5);
this.driveController = driveTrain.getDriveController();
this.driveController.setDoneRange(0.5);
- this.driveController.setMaxOutput(1
.1
);
+ this.driveController.setMaxOutput(1);
this.driveController.setMinDoneCycles(5);
}
this.driveController.setMinDoneCycles(5);
}
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
index d124775d37e4170b977a16d84fa8e12696caa3e6..6d09477325061cb9eff162b14cd9882e8ed03a13 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
@@
-22,7
+22,7
@@
public class DriveTrain extends Subsystem {
public static final String DRIVE_I_Val = "DriveI";
public static final String DRIVE_D_Val = "DriveD";
public static final String DRIVE_TARGET_DIST = "SET_DIST";
public static final String DRIVE_I_Val = "DriveI";
public static final String DRIVE_D_Val = "DriveD";
public static final String DRIVE_TARGET_DIST = "SET_DIST";
- public static final String
DRIVE_MOTOR_VAL = "SPEED
";
+ public static final String
MAX_TIME_OUT = "MaxTimeOut
";
public static final String GYRO_P_Val = "GyroP";
public static final String GYRO_I_Val = "GyroI";
public static final String GYRO_D_Val = "GyroD";
public static final String GYRO_P_Val = "GyroP";
public static final String GYRO_I_Val = "GyroI";
public static final String GYRO_D_Val = "GyroD";