add claw toggle and winch tensioning
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / subsystems / Claw.java
1 package org.usfirst.frc.team3501.robot.subsystems;
2
3 import org.usfirst.frc.team3501.robot.RobotMap;
4
5 import edu.wpi.first.wpilibj.DoubleSolenoid;
6 import edu.wpi.first.wpilibj.command.Subsystem;
7
8 public class Claw extends Subsystem {
9
10 private DoubleSolenoid piston;
11
12 public Claw() {
13 piston = new DoubleSolenoid(
14 RobotMap.CLAW_FORWARD_CHANNEL, RobotMap.CLAW_REVERSE_CHANNEL);
15 }
16
17 public void open() {
18 piston.set(RobotMap.OPEN);
19 }
20
21 public void close() {
22 piston.set(RobotMap.CLOSED);
23 }
24
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
33 public void initDefaultCommand() {}
34 }