From bed6dbe69a59c9c2d50119fabae1012ad56a15c9 Mon Sep 17 00:00:00 2001 From: Meryem Esa Date: Sat, 14 Jan 2017 11:33:20 -0800 Subject: [PATCH] add motorVal parameter to DriveDistance and TurnForAngle commands --- .../team3501/robot/commands/driving/DriveDistance.java | 3 ++- .../frc/team3501/robot/commands/driving/TurnForAngle.java | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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()); } -- 2.30.2