add motorVal parameter to DriveDistance and TurnForAngle commands
authorMeryem Esa <meresa14@gmail.com>
Sat, 14 Jan 2017 19:33:20 +0000 (11:33 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Sat, 14 Jan 2017 23:01:53 +0000 (15:01 -0800)
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java

index 2af7387150068f67bf2e102dd5044a814f2fc73e..8af1bcbfc3f9e21d9756dc808916539473aedcdf 100755 (executable)
@@ -10,10 +10,11 @@ import edu.wpi.first.wpilibj.command.Command;
  *
  * parameters:
  * distance the robot will move in inches
+ * motorVal: the motor input to set the motors to
  */
 public class DriveDistance extends Command {
 
-  public DriveDistance(double distance) {
+  public DriveDistance(double distance, double motorVal) {
     requires(Robot.getDriveTrain());
   }
 
index becaa3a2b759b4289abdf36b675b2f621c1f9127..993adc8c5b46922c1cb6ad5d0fc1565af8cec7ca 100755 (executable)
@@ -10,13 +10,13 @@ import edu.wpi.first.wpilibj.command.Command;
  * either left or right
  *
  * parameters:
- * angle the robot will turn - in degrees
- * direction the robot will turn - either right or left
- *
+ * angle: the robot will turn - in degrees
+ * direction: the robot will turn - either right or left
+ * motorVal: the motor input to set the motors to
  */
 public class TurnForAngle extends Command {
 
-  public TurnForAngle(double angle, Direction direction) {
+  public TurnForAngle(double angle, Direction direction, double motorVal) {
     requires(Robot.getDriveTrain());
   }