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 | private DoubleSolenoid piston; |
12 | private CANTalon winch; | |
13 | ||
14 | public Scaler() { | |
15 | piston = new DoubleSolenoid(Constants.Scaler.FORWARD_CHANNEL, | |
16 | Constants.Scaler.REVERSE_CHANNEL); | |
17 | winch = new CANTalon(Constants.Scaler.WINCH_MOTOR); | |
ae33aa8d | 18 | |
15651225 K |
19 | } |
20 | ||
ae33aa8d | 21 | public void setPistonStatus(int status) { |
15651225 K |
22 | |
23 | } | |
24 | ||
25 | public Value getSolenoidValue() { | |
26 | return piston.get(); | |
27 | } | |
28 | ||
29 | public void liftScissorLift() { | |
30 | piston.set(DoubleSolenoid.Value.kReverse); | |
31 | } | |
32 | ||
33 | public void lowerScissorLift() { | |
34 | piston.set(DoubleSolenoid.Value.kForward); | |
35 | } | |
ae33aa8d | 36 | |
05fc6bf5 | 37 | public void engageHook() { |
ae33aa8d | 38 | |
05fc6bf5 | 39 | } |
15651225 K |
40 | |
41 | public void disengageHook() { | |
42 | } | |
43 | ||
44 | public void runWinch(double speed) { | |
45 | if (speed > 1) | |
46 | speed = 1; | |
47 | if (speed < -1) | |
48 | speed = -1; | |
49 | ||
50 | winch.set(speed); | |
51 | } | |
ae33aa8d SC |
52 | |
53 | @Override | |
54 | protected void initDefaultCommand() { | |
55 | ||
56 | } | |
31f6cd19 | 57 | } |