6d95b99491209dd6299612de8144ac5debe218f5
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.intakearm
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
4 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
6 import edu
.wpi
.first
.wpilibj
.CANTalon
;
7 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 * This command runs the given motor (intended to be an intake arm motor) at the
11 * given speed momentarily.
13 * @author harel, garima
17 public class RunIntakeMotor
extends Command
{
25 * Speed at which to run motor. Range is [-1,1]
27 public RunIntakeMotor(CANTalon intakeMotor
, double motorSpeed
) {
28 requires(Robot
.intakeArm
);
29 this.intakeMotor
= intakeMotor
;
30 this.motorSpeed
= motorSpeed
;
34 protected void initialize() {
35 intakeMotor
.set(motorSpeed
);
39 protected void execute() {
44 protected boolean isFinished() {
49 protected void end() {
50 intakeMotor
.set(Constants
.IntakeArm
.STOP_INTAKE_ARM_SPEED
);
54 protected void interrupted() {