Add set motor speed methods in defense arm and add potentiometer getter methods
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Scaler.java
CommitLineData
31f6cd19 1package org.usfirst.frc.team3501.robot.subsystems;
15651225 2
31f6cd19
K
3import org.usfirst.frc.team3501.robot.Constants;
4
cb16c238 5import edu.wpi.first.wpilibj.CANTalon;
31f6cd19
K
6import edu.wpi.first.wpilibj.DoubleSolenoid;
7import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
8import edu.wpi.first.wpilibj.command.Subsystem;
9
10public 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}