summaryrefslogtreecommitdiff
path: root/src/main/java/frc/robot/subsystems/Intake.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/frc/robot/subsystems/Intake.java')
-rw-r--r--src/main/java/frc/robot/subsystems/Intake.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/java/frc/robot/subsystems/Intake.java b/src/main/java/frc/robot/subsystems/Intake.java
new file mode 100644
index 0000000..85cbbf8
--- /dev/null
+++ b/src/main/java/frc/robot/subsystems/Intake.java
@@ -0,0 +1,34 @@
+package frc.robot.subsystems;
+
+import org.littletonrobotics.junction.Logger;
+import com.revrobotics.CANSparkMax;
+
+import edu.wpi.first.wpilibj2.command.SubsystemBase;
+import frc.robot.Constants;
+
+public class Intake extends SubsystemBase
+{
+ private final CANSparkMax m_intakeT = Constants.intakeT;
+ private final CANSparkMax m_intakeD = Constants.intakeD;
+
+ public Intake() { }
+
+ public void atPercentage(double perc)
+ {
+ atPercentage(perc, perc);
+ }
+
+ public void atPercentage(double upPerc, double downPerc)
+ {
+ m_intakeT.set(upPerc);
+ m_intakeD.set(downPerc);
+ }
+
+ @Override
+ public void periodic()
+ {
+ Logger.recordOutput(getName() + "/speedT", m_intakeT.getEncoder().getVelocity());
+ Logger.recordOutput(getName() + "/speedD", m_intakeD.getEncoder().getVelocity());
+
+ }
+}