reset to unix format
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Scaler.java
index f16f424bf6e05ad5927476ab311bbf28944078e1..3c47a4764fd9c7cf401f0e16002981783bed6b35 100755 (executable)
@@ -1,4 +1,5 @@
 package org.usfirst.frc.team3501.robot.subsystems;
+
 import org.usfirst.frc.team3501.robot.Constants;
 
 import edu.wpi.first.wpilibj.CANTalon;
@@ -7,41 +8,82 @@ import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
 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);
-       }
+  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);
+  }
+
+  public Value getSolenoidValue() {
+    return piston.get();
+  }
+
+  public void liftScissorLift() {
+    piston.set(DoubleSolenoid.Value.kReverse);
+  }
+
+  public void lowerScissorLift() {
+    piston.set(DoubleSolenoid.Value.kForward);
+  }
+
+  public void engageHook() {
+
+  }
+
+  public void disengageHook() {
+  }
+
+  public void runWinch(double speed) {
+    if (speed > 1)
+      speed = 1;
+    if (speed < -1)
+      speed = -1;
+
+    winch.set(speed);
+  }
+
+  /***
+   * This method returns boolean value true or false on whether piston is
+   * extended or not.
+   *
+   * @return
+   *         returns true if piston is extended, false if otherwise.
+   */
+  public boolean getPistonStatus() {
+    return true;
+  }
+
+  /***
+   * This method sets the motor voltage for the scissor lift. The range is from
+   * [-1, 1].
+   *
+   * @param speed
+   *          The voltage that you set the motor at. The range of the voltage of
+   *          the motor is from [-1,1].
+   */
+  public void setScalarSpeed(double speed) {
+
+  }
+
+  /***
+   * This method sets the piston status for the scissor lift.
+   * The piston can either be extended or not extended.
+   *
+   * @param status
+   *          The status of the piston.
+   *          0 for the piston to be extended, 1 for the piston to not be
+   *          extended.
+   */
+
+  public void setPistonStatus(int status) {
+
+  }
+
+  @Override
+  protected void initDefaultCommand() {
+
+  }
 }