Commit | Line | Data |
---|---|---|
b449387d LH |
1 | package org.usfirst.frc.team3501.robot.subsystems; |
2 | ||
3e4790a8 LH |
3 | import org.usfirst.frc.team3501.robot.RobotMap; |
4 | ||
5 | import edu.wpi.first.wpilibj.CANJaguar; | |
b449387d LH |
6 | import edu.wpi.first.wpilibj.command.Subsystem; |
7 | ||
b449387d | 8 | public class Arm extends Subsystem { |
b449387d | 9 | |
3e4790a8 LH |
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); | |
b449387d | 25 | } |
3e4790a8 LH |
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() {} | |
b449387d LH |
40 | } |
41 |