diff options
author | kartofen <mladenovnasko0@gmail.com> | 2024-03-03 23:20:11 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2024-03-03 23:20:11 +0200 |
commit | 39f4c3f833ec119a0060cb833c7a1953bca76eef (patch) | |
tree | d943fd0f8d6f0e5edf423ee8ba24aabb671717c5 /src/main/java/frc/robot/subsystems/Intake.java | |
parent | b929a1d34690d3d7fed6686459ff803962ce907f (diff) |
more subsystems
Diffstat (limited to 'src/main/java/frc/robot/subsystems/Intake.java')
-rw-r--r-- | src/main/java/frc/robot/subsystems/Intake.java | 34 |
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()); + + } +} |