| 1 | package org.usfirst.frc.team3501.robot.commands.driving; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Robot; |
| 4 | import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; |
| 5 | |
| 6 | import edu.wpi.first.wpilibj.command.Command; |
| 7 | |
| 8 | /** |
| 9 | * This command shifts the gear to high |
| 10 | * |
| 11 | * Author: Rohan Rodrigues |
| 12 | */ |
| 13 | public class ShiftDriveLowGear extends Command { |
| 14 | DriveTrain driveTrain = Robot.getDriveTrain(); |
| 15 | |
| 16 | public ShiftDriveLowGear() { |
| 17 | requires(driveTrain); |
| 18 | } |
| 19 | |
| 20 | @Override |
| 21 | protected void initialize() { |
| 22 | |
| 23 | } |
| 24 | |
| 25 | @Override |
| 26 | protected void execute() { |
| 27 | driveTrain.setLowGear(); |
| 28 | System.out.println("Current Value is: " + driveTrain.getLeftMotorVal()); |
| 29 | } |
| 30 | |
| 31 | @Override |
| 32 | protected boolean isFinished() { |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | @Override |
| 37 | protected void end() { |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | protected void interrupted() { |
| 42 | } |
| 43 | } |