package org.usfirst.frc.team3501.robot.subsystems;
+
import org.usfirst.frc.team3501.robot.Constants;
import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.command.Subsystem;
public class Scaler extends Subsystem {
- //Scaler related objects
- private DoubleSolenoid piston;
- private CANTalon winch;
-
- public Scaler() {
- piston = new DoubleSolenoid(Constants.Scaler.FORWARD_CHANNEL, Constants.Scaler.REVERSE_CHANNEL);
- winch = new CANTalon(Constants.Scaler.WINCH_MOTOR);
- }
-
- @Override
- protected void initDefaultCommand() {
-
- }
-
- public Value getSolenoidValue(){
- return piston.get();
- }
-
- public void liftScissorLift(){
- piston.set(DoubleSolenoid.Value.kReverse);
- }
-
- public void lowerScissorLift(){
- piston.set(DoubleSolenoid.Value.kForward);
- }
-
- public void disengageHook(){
- }
-
- public void runWinch(double speed){
- if( speed > 1)
- speed = 1;
- if(speed < -1)
- speed = -1;
-
- winch.set(speed);
- }
+ // Scaler related objects
+ private DoubleSolenoid piston;
+ private CANTalon winch;
+
+ public Scaler() {
+ piston = new DoubleSolenoid(Constants.Scaler.FORWARD_CHANNEL,
+ Constants.Scaler.REVERSE_CHANNEL);
+ winch = new CANTalon(Constants.Scaler.WINCH_MOTOR);
+ }
+
+ @Override
+ protected void initDefaultCommand() {
+
+ }
+
+ public Value getSolenoidValue() {
+ return piston.get();
+ }
+
+ public void liftScissorLift() {
+ piston.set(DoubleSolenoid.Value.kReverse);
+ }
+
+ public void lowerScissorLift() {
+ piston.set(DoubleSolenoid.Value.kForward);
+ }
+
+ public void disengageHook() {
+ }
+
+ public void runWinch(double speed) {
+ if (speed > 1)
+ speed = 1;
+ if (speed < -1)
+ speed = -1;
+
+ winch.set(speed);
+ }
}