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