From: Meryem Esa Date: Sat, 14 Jan 2017 19:33:20 +0000 (-0800) Subject: add motorVal parameter to DriveDistance and TurnForAngle commands X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=bed6dbe69a59c9c2d50119fabae1012ad56a15c9 add motorVal parameter to DriveDistance and TurnForAngle commands --- 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 2af7387..8af1bcb 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java @@ -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()); } 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 becaa3a..993adc8 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForAngle.java @@ -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()); }