summaryrefslogtreecommitdiff
path: root/src/main/java/frc/robot/subsystems/Shooter.java
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2024-03-03 23:20:11 +0200
committerkartofen <mladenovnasko0@gmail.com>2024-03-03 23:20:11 +0200
commit39f4c3f833ec119a0060cb833c7a1953bca76eef (patch)
treed943fd0f8d6f0e5edf423ee8ba24aabb671717c5 /src/main/java/frc/robot/subsystems/Shooter.java
parentb929a1d34690d3d7fed6686459ff803962ce907f (diff)
more subsystems
Diffstat (limited to 'src/main/java/frc/robot/subsystems/Shooter.java')
-rw-r--r--src/main/java/frc/robot/subsystems/Shooter.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/frc/robot/subsystems/Shooter.java b/src/main/java/frc/robot/subsystems/Shooter.java
new file mode 100644
index 0000000..f171049
--- /dev/null
+++ b/src/main/java/frc/robot/subsystems/Shooter.java
@@ -0,0 +1,33 @@
+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 Shooter extends SubsystemBase
+{
+ private final CANSparkMax m_shooterT = Constants.shooterT;
+ private final CANSparkMax m_shooterD = Constants.shooterD;
+
+ public Shooter() { }
+
+ public void atPercentage(double perc)
+ {
+ atPercentage(perc, perc);
+ }
+
+ public void atPercentage(double upPerc, double downPerc)
+ {
+ m_shooterT.set(upPerc);
+ m_shooterD.set(downPerc);
+ }
+
+ @Override
+ public void periodic()
+ {
+ Logger.recordOutput(getName() + "/speedT", m_shooterT.getEncoder().getVelocity());
+ Logger.recordOutput(getName() + "/speedD", m_shooterD.getEncoder().getVelocity());
+ }
+}