From a0c3ca746a7f9daa124ec1e7495de5417e4ae9f9 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 23 Jan 2016 15:57:47 -0800 Subject: [PATCH] Remove control m from file --- .../team3501/robot/subsystems/Shooter.java | 105 +++++++++--------- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index e6773171..675b4b8c 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -1,52 +1,53 @@ -package org.usfirst.frc.team3501.robot.subsystems; - -import org.usfirst.frc.team3501.robot.Constants; -import org.usfirst.frc.team3501.robot.Constants.Shooter.State; - -import edu.wpi.first.wpilibj.CANTalon; -import edu.wpi.first.wpilibj.command.Subsystem; - -public class Shooter extends Subsystem { - private CANTalon shooter; - - public Shooter() { - shooter = new CANTalon(Constants.Shooter.PORT); - } - - public double getCurrentSetPoint() { - return shooter.get(); - } - - public void setSpeed(double speed) { - if (speed >= 1.0) - shooter.set(1.0); - else if (speed <= -1.0) - shooter.set(-1.0); - else - shooter.set(speed); - } - - public void stop() { - this.setSpeed(0.0); - } - - public State getState() { - return (this.getCurrentSetPoint() == 0) ? State.RUNNING : State.STOPPED; - } - - // Use negative # for decrement. Positive for increment. - public void changeSpeed(double change) { - if (getCurrentSetPoint() + change >= 1.0) - shooter.set(1.0); - else if (getCurrentSetPoint() + change <= -1.0) - shooter.set(-1.0); - else { - double newSpeed = getCurrentSetPoint() + change; - setSpeed(newSpeed); - } - } - - @Override - protected void initDefaultCommand() { - } -} +package org.usfirst.frc.team3501.robot.subsystems; + +import org.usfirst.frc.team3501.robot.Constants; +import org.usfirst.frc.team3501.robot.Constants.Shooter.State; + +import edu.wpi.first.wpilibj.CANTalon; +import edu.wpi.first.wpilibj.command.Subsystem; + +public class Shooter extends Subsystem { + // TODO: check all files for control m characters + private CANTalon shooter; + + public Shooter() { + shooter = new CANTalon(Constants.Shooter.PORT); + } + + public double getCurrentSetPoint() { + return shooter.get(); + } + + public void setSpeed(double speed) { + if (speed >= 1.0) + shooter.set(1.0); + else if (speed <= -1.0) + shooter.set(-1.0); + else + shooter.set(speed); + } + + public void stop() { + this.setSpeed(0.0); + } + + public State getState() { + return (this.getCurrentSetPoint() == 0) ? State.RUNNING : State.STOPPED; + } + + // Use negative # for decrement. Positive for increment. + public void changeSpeed(double change) { + if (getCurrentSetPoint() + change >= 1.0) + shooter.set(1.0); + else if (getCurrentSetPoint() + change <= -1.0) + shooter.set(-1.0); + else { + double newSpeed = getCurrentSetPoint() + change; + setSpeed(newSpeed); + } + } + + @Override + protected void initDefaultCommand() { + } +} -- 2.30.2