| 1 | package org.usfirst.frc.team3501.robot.subsystems; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Constants; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.CANTalon; |
| 6 | import edu.wpi.first.wpilibj.command.Subsystem; |
| 7 | |
| 8 | public class IntakeArm extends Subsystem { |
| 9 | |
| 10 | private CANTalon intake; |
| 11 | private CANTalon chevalDeFriseHand; |
| 12 | |
| 13 | public IntakeArm() { |
| 14 | intake = new CANTalon(Constants.IntakeArm.PORT); |
| 15 | chevalDeFriseHand = new CANTalon(Constants.IntakeArm.CHEVAL_DE_FRISE_HAND_PORT); |
| 16 | } |
| 17 | |
| 18 | /* |
| 19 | * Intake only moves once at the beginning of the match. It lowers at the |
| 20 | * beginning of the match and is held there by mechanical stops until the end |
| 21 | * of the match. |
| 22 | * |
| 23 | * Must be used in a command that has a timer variable to stop it. |
| 24 | */ |
| 25 | public void dropIntake() { |
| 26 | intake.set(0.3); |
| 27 | } |
| 28 | |
| 29 | public void intake() { |
| 30 | intake.set(Constants.IntakeArm.INTAKE_SPEED); |
| 31 | } |
| 32 | |
| 33 | public void output() { |
| 34 | intake.set(Constants.IntakeArm.OUTPUT_SPEED); |
| 35 | } |
| 36 | |
| 37 | /*** |
| 38 | * This method allows you to set the speed of the motor(s). The range of speed |
| 39 | * is from [-1, 1]. A negative speed changes the direction of the motors. |
| 40 | * |
| 41 | * @param speed |
| 42 | * The speed of the motors that control the rollers. The range of |
| 43 | * these motors go from [-1,1]. A negative speed changes the |
| 44 | * direction of the motors. |
| 45 | */ |
| 46 | |
| 47 | public void setRollerSpeed(double speed) { |
| 48 | |
| 49 | } |
| 50 | |
| 51 | /*** |
| 52 | * |
| 53 | * @return |
| 54 | */ |
| 55 | |
| 56 | public double getRollerSpeed() { |
| 57 | return 0; |
| 58 | } |
| 59 | |
| 60 | /*** |
| 61 | * |
| 62 | * @return |
| 63 | */ |
| 64 | |
| 65 | public boolean isBallInside() { |
| 66 | return true; |
| 67 | } |
| 68 | |
| 69 | /*** |
| 70 | * |
| 71 | * @return |
| 72 | */ |
| 73 | |
| 74 | public boolean areRollersRolling() { |
| 75 | return true; |
| 76 | } |
| 77 | |
| 78 | @Override |
| 79 | protected void initDefaultCommand() { |
| 80 | |
| 81 | } |
| 82 | } |