Commit | Line | Data |
---|---|---|
31f6cd19 | 1 | package org.usfirst.frc.team3501.robot.subsystems; |
15651225 | 2 | |
31f6cd19 K |
3 | import org.usfirst.frc.team3501.robot.Constants; |
4 | ||
cb16c238 | 5 | import edu.wpi.first.wpilibj.CANTalon; |
31f6cd19 K |
6 | import edu.wpi.first.wpilibj.DoubleSolenoid; |
7 | import edu.wpi.first.wpilibj.DoubleSolenoid.Value; | |
8 | import edu.wpi.first.wpilibj.command.Subsystem; | |
9 | ||
10 | public class Scaler extends Subsystem { | |
15651225 K |
11 | // Scaler related objects |
12 | private DoubleSolenoid piston; | |
13 | private CANTalon winch; | |
14 | ||
15 | public Scaler() { | |
16 | piston = new DoubleSolenoid(Constants.Scaler.FORWARD_CHANNEL, | |
17 | Constants.Scaler.REVERSE_CHANNEL); | |
18 | winch = new CANTalon(Constants.Scaler.WINCH_MOTOR); | |
19 | } | |
20 | ||
21 | @Override | |
22 | protected void initDefaultCommand() { | |
23 | ||
24 | } | |
25 | ||
26 | public Value getSolenoidValue() { | |
27 | return piston.get(); | |
28 | } | |
29 | ||
30 | public void liftScissorLift() { | |
31 | piston.set(DoubleSolenoid.Value.kReverse); | |
32 | } | |
33 | ||
34 | public void lowerScissorLift() { | |
35 | piston.set(DoubleSolenoid.Value.kForward); | |
36 | } | |
05fc6bf5 LM |
37 | |
38 | public void engageHook() { | |
39 | ||
40 | } | |
15651225 K |
41 | |
42 | public void disengageHook() { | |
43 | } | |
44 | ||
45 | public void runWinch(double speed) { | |
46 | if (speed > 1) | |
47 | speed = 1; | |
48 | if (speed < -1) | |
49 | speed = -1; | |
50 | ||
51 | winch.set(speed); | |
52 | } | |
31f6cd19 | 53 | } |