c6d400778e523692a5d1ff88449510bc7822a825
1 package org
.usfirst
.frc
.team3501
.robot
.subsystems
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
5 import edu
.wpi
.first
.wpilibj
.CANTalon
;
6 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
;
7 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
.Value
;
8 import edu
.wpi
.first
.wpilibj
.command
.Subsystem
;
10 public class Scaler
extends Subsystem
{
11 private DoubleSolenoid piston
;
12 private CANTalon winch
;
15 piston
= new DoubleSolenoid(Constants
.Scaler
.FORWARD_CHANNEL
,
16 Constants
.Scaler
.REVERSE_CHANNEL
);
17 winch
= new CANTalon(Constants
.Scaler
.WINCH_MOTOR
);
20 public Value
getSolenoidValue() {
24 public void liftScissorLift() {
25 piston
.set(DoubleSolenoid
.Value
.kReverse
);
28 public void lowerScissorLift() {
29 piston
.set(DoubleSolenoid
.Value
.kForward
);
32 public void engageHook() {
36 public void disengageHook() {
39 public void runWinch(double speed
) {
48 public void stopWinch() {
49 runWinch(Constants
.Scaler
.WINCH_STOP_SPEED
);
53 * This method returns boolean value true or false on whether piston is
56 * @return returns true if piston is extended, false if otherwise.
58 public boolean getPistonStatus() {
63 * This method sets the piston status for the scissor lift. The piston can
64 * either be extended or not extended.
67 * The status of the piston. 0 for the piston to be extended, 1 for
68 * the piston to not be extended.
71 public void setPistonStatus(int status
) {
76 protected void initDefaultCommand() {