Commit | Line | Data |
---|---|---|
7b3f27eb SG |
1 | package org.usfirst.frc.team3501.robot.subsystems; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Constants; | |
4 | ||
5 | import com.ctre.CANTalon; | |
6 | ||
7 | import edu.wpi.first.wpilibj.command.Subsystem; | |
8 | ||
9 | public class Climber extends Subsystem { | |
10 | private static Climber climber; | |
11 | private final CANTalon motor; | |
12 | ||
13 | private Climber() { | |
14 | motor = new CANTalon(Constants.Climber.MOTOR); | |
15 | } | |
16 | ||
17 | public static Climber getClimber() { | |
18 | if (climber == null) { | |
19 | climber = new Climber(); | |
20 | } | |
21 | return climber; | |
22 | } | |
23 | ||
24 | public void stop() { | |
25 | setMotorValue(0); | |
26 | } | |
27 | ||
28 | public void setMotorValue(final double val) { | |
29 | motor.set(MOTOR); | |
30 | ||
31 | } | |
32 | } |