Commit | Line | Data |
---|---|---|
aa160dfd ME |
1 | package org.usfirst.frc.team3501.robot.commands.driving; |
2 | ||
8af76159 | 3 | import org.usfirst.frc.team3501.robot.Constants.Direction; |
aa160dfd ME |
4 | import org.usfirst.frc.team3501.robot.Robot; |
5 | ||
6 | import edu.wpi.first.wpilibj.command.Command; | |
7 | ||
8 | /** | |
9b9d6bed ME |
9 | * This command turns the robot for a specified angle in specified direction - |
10 | * either left or right | |
11 | * | |
12 | * parameters: | |
bed6dbe6 ME |
13 | * angle: the robot will turn - in degrees |
14 | * direction: the robot will turn - either right or left | |
15 | * motorVal: the motor input to set the motors to | |
aa160dfd ME |
16 | */ |
17 | public class TurnForAngle extends Command { | |
18 | ||
bed6dbe6 | 19 | public TurnForAngle(double angle, Direction direction, double motorVal) { |
d17d868d | 20 | requires(Robot.getDriveTrain()); |
21 | } | |
22 | ||
23 | // Called just before this Command runs the first time | |
24 | @Override | |
25 | protected void initialize() { | |
26 | } | |
27 | ||
28 | // Called repeatedly when this Command is scheduled to run | |
29 | @Override | |
30 | protected void execute() { | |
31 | } | |
32 | ||
33 | // Make this return true when this Command no longer needs to run execute() | |
34 | @Override | |
35 | protected boolean isFinished() { | |
36 | return false; | |
37 | } | |
38 | ||
39 | // Called once after isFinished returns true | |
40 | @Override | |
41 | protected void end() { | |
42 | } | |
43 | ||
44 | // Called when another command which requires one or more of the same | |
45 | // subsystems is scheduled to run | |
46 | @Override | |
47 | protected void interrupted() { | |
48 | } | |
aa160dfd | 49 | } |