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
4f1eb45e 21<<<<<<< 39cd129b533ffb726c00d5d5cd98b541a25d23bd
ae33aa8d 22 public void setPistonStatus(int status) {
15651225
K
23
24 }
25
4f1eb45e
SC
26=======
27>>>>>>> Add set motor speed methods in defense arm and add potentiometer getter methods
15651225
K
28 public Value getSolenoidValue() {
29 return piston.get();
30 }
31
32 public void liftScissorLift() {
33 piston.set(DoubleSolenoid.Value.kReverse);
34 }
35
36 public void lowerScissorLift() {
37 piston.set(DoubleSolenoid.Value.kForward);
38 }
ae33aa8d 39
05fc6bf5 40 public void engageHook() {
ae33aa8d 41
05fc6bf5 42 }
15651225
K
43
44 public void disengageHook() {
45 }
46
47 public void runWinch(double speed) {
48 if (speed > 1)
49 speed = 1;
50 if (speed < -1)
51 speed = -1;
52
53 winch.set(speed);
54 }
ae33aa8d 55
4f1eb45e
SC
56<<<<<<< 39cd129b533ffb726c00d5d5cd98b541a25d23bd
57=======
58 /***
59 * This method returns boolean value true or false on whether piston is
60 * extended or not.
61 *
62 * @return
63 * returns true if piston is extended, false if otherwise.
64 */
65 public boolean getPistonStatus() {
66 return true;
67 }
68
69 /***
70 * This method sets the motor voltage for the scissor lift. The range is from
71 * [-1, 1].
72 *
73 * @param speed
74 * The voltage that you set the motor at. The range of the voltage of
75 * the motor is from [-1,1].
76 */
77 public void setScalarSpeed(double speed) {
78
79 }
80
81 /***
82 * This method sets the piston status for the scissor lift.
83 * The piston can either be extended or not extended.
84 *
85 * @param status
86 * The status of the piston.
87 * 0 for the piston to be extended, 1 for the piston to not be
88 * extended.
89 */
90
91 public void setPistonStatus(int status) {
92
93 }
94
95>>>>>>> Add set motor speed methods in defense arm and add potentiometer getter methods
ae33aa8d
SC
96 @Override
97 protected void initDefaultCommand() {
98
99 }
4f1eb45e
SC
100<<<<<<< 39cd129b533ffb726c00d5d5cd98b541a25d23bd
101=======
102
103>>>>>>> Add set motor speed methods in defense arm and add potentiometer getter methods
31f6cd19 104}