continue to flesh out initial codebase
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / subsystems / Arm.java
1 package org.usfirst.frc.team3501.robot.subsystems;
2
3 import org.usfirst.frc.team3501.robot.RobotMap;
4
5 import edu.wpi.first.wpilibj.CANJaguar;
6 import edu.wpi.first.wpilibj.command.Subsystem;
7
8 public class Arm extends Subsystem {
9
10 private CANJaguar left, right;
11
12 public Arm() {
13 left = new CANJaguar(RobotMap.LEFT_WINCH_ADDRESS);
14 right = new CANJaguar(RobotMap.RIGHT_WINCH_ADDRESS);
15 }
16
17 public void set(double speed) {
18 left.set(-speed);
19 right.set(speed);
20 }
21
22 public void moveLeft(double speed) {
23 left.set(speed);
24 right.set(0);
25 }
26
27 public void moveRight(double speed) {
28 right.set(speed);
29 left.set(0);
30 }
31
32 public double getSpeedFromJoystick(double speed) {
33 if (Math.abs(speed) < RobotMap.MIN_ARM_JOYSTICK_INPUT)
34 speed = 0;
35
36 return speed;
37 }
38
39 public void initDefaultCommand() {}
40 }
41