Commit | Line | Data |
---|---|---|
9738295a SG |
1 | package org.usfirst.frc.team3501.robot.subsystems; |
2 | ||
43980ce1 SG |
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 { | |
9738295a | 10 | private static Climber climber; |
43980ce1 | 11 | private final CANTalon motor; |
9738295a SG |
12 | |
13 | private Climber() { | |
43980ce1 | 14 | motor = new CANTalon(Constants.Climber.MOTOR); |
9738295a SG |
15 | } |
16 | ||
17 | public static Climber getClimber() { | |
18 | if (climber == null) { | |
dbf2ff8f | 19 | climber = new Climber(); |
9738295a SG |
20 | } |
21 | return climber; | |
22 | } | |
cf086549 SG |
23 | |
24 | public void stop() { | |
de8c65d3 | 25 | setMotorValue(0); |
cf086549 SG |
26 | } |
27 | ||
de8c65d3 | 28 | public void setMotorValue(final double val) { |
43980ce1 | 29 | motor.set(MOTOR); |
cf086549 SG |
30 | |
31 | } | |
9738295a | 32 | } |