diff --git a/Intake.java b/Intake.java deleted file mode 100644 index 859cfea..0000000 --- a/Intake.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.robolancers321.subsystems; - -public class Intake extends SubsystemBase{ - - public CANSparkMax intakemotor; - SparkPIDController IntakePIDController; - - public int kport = 0; - public double power = 0; - public double kFF = 0; - - public void intake() { - - this.intakemotor = new CANSparkMax(kport, MotorType.kBrushless); - this.intakemotor.setSmartCurrentLimit(20); - SmartDashboard.putNumber("intake-kFF", kFF); - } - - @Override - public void periodic() { - - intakemotor.set(power); - double kFF = SmartDashboard.getNumber("kFF", 0); - IntakePIDController.setFF(kFF); - } - - public Command on(double power) { - - return runOnce(() -> intakemotor.set(power)); - } - - public Command off(double power) { - - return runOnce(() -> intakemotor.set(0)); - } -} diff --git a/src/main/java/org/robolancers321/BuildConstants.java b/src/main/java/org/robolancers321/BuildConstants.java index 7a9440c..6e9ddee 100644 --- a/src/main/java/org/robolancers321/BuildConstants.java +++ b/src/main/java/org/robolancers321/BuildConstants.java @@ -7,12 +7,12 @@ public final class BuildConstants { public static final String MAVEN_GROUP = ""; public static final String MAVEN_NAME = "321-Crescendo-2024"; public static final String VERSION = "unspecified"; - public static final int GIT_REVISION = 6; - public static final String GIT_SHA = "6377635d69d5713f8f8b5400fc7a136abe5c431e"; - public static final String GIT_DATE = "2024-01-21 18:36:14 EST"; + public static final int GIT_REVISION = 9; + public static final String GIT_SHA = "d7f5a071320caae2dbf837f6d4b8063c990ef911"; + public static final String GIT_DATE = "2024-01-24 17:03:30 EST"; public static final String GIT_BRANCH = "dev-intake"; - public static final String BUILD_DATE = "2024-01-24 08:18:40 EST"; - public static final long BUILD_UNIX_TIME = 1706102320667L; + public static final String BUILD_DATE = "2024-01-24 17:22:28 EST"; + public static final long BUILD_UNIX_TIME = 1706134948601L; public static final int DIRTY = 0; private BuildConstants(){} diff --git a/src/main/java/org/robolancers321/subsystem/Intake.java b/src/main/java/org/robolancers321/subsystem/Intake.java index bf6f122..09b5461 100644 --- a/src/main/java/org/robolancers321/subsystem/Intake.java +++ b/src/main/java/org/robolancers321/subsystem/Intake.java @@ -3,36 +3,34 @@ import com.revrobotics.CANSparkLowLevel.MotorType; import com.revrobotics.CANSparkMax; -import com.revrobotics.SparkPIDController; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.SubsystemBase; public class Intake extends SubsystemBase { - public CANSparkMax intakemotor; - SparkPIDController IntakePIDController; + public CANSparkMax intakeMotor; - public int kport = 0; + public int kPort = 0; public double power = 0; - public void intake() { + public void Intake() { - this.intakemotor = new CANSparkMax(kport, MotorType.kBrushless); - this.intakemotor.setSmartCurrentLimit(20); + this.intakeMotor = new CANSparkMax(kPort, MotorType.kBrushless); + this.intakeMotor.setSmartCurrentLimit(20); } public Command in(double power) { - return runOnce(() -> intakemotor.set(power)); + return runOnce(() -> intakeMotor.set(power)); } public Command out(double power) { - return runOnce(() -> intakemotor.set(-power)); + return runOnce(() -> intakeMotor.set(-power)); } public Command off(double power) { - return runOnce(() -> intakemotor.set(0)); + return runOnce(() -> intakeMotor.set(0)); } }