Commit | Line | Data |
---|---|---|
b449387d LH |
1 | package org.usfirst.frc.team3501.robot.subsystems; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.RobotMap; | |
b449387d LH |
4 | |
5 | import edu.wpi.first.wpilibj.DoubleSolenoid; | |
6 | import edu.wpi.first.wpilibj.command.Subsystem; | |
7 | ||
8 | public class Claw extends Subsystem { | |
9 | ||
3e4790a8 | 10 | private DoubleSolenoid piston; |
b449387d LH |
11 | |
12 | public Claw() { | |
13 | piston = new DoubleSolenoid( | |
14 | RobotMap.CLAW_FORWARD_CHANNEL, RobotMap.CLAW_REVERSE_CHANNEL); | |
15 | } | |
16 | ||
b449387d LH |
17 | public void open() { |
18 | piston.set(RobotMap.OPEN); | |
19 | } | |
20 | ||
21 | public void close() { | |
22 | piston.set(RobotMap.CLOSED); | |
23 | } | |
b449387d | 24 | |
d24e8611 LH |
25 | public boolean isOpen() { |
26 | return piston.get().equals(RobotMap.OPEN); | |
27 | } | |
28 | ||
29 | public boolean isClosed() { | |
30 | return piston.get().equals(RobotMap.CLOSED); | |
31 | } | |
32 | ||
3e4790a8 LH |
33 | public void initDefaultCommand() {} |
34 | } |