Created shooter subsystem

This commit is contained in:
C4llSqin
2024-11-07 17:52:12 -07:00
parent f4b8ead1bc
commit 025d14c128
3 changed files with 33 additions and 1 deletions
@@ -146,4 +146,9 @@ public final class Constants {
public static final double LEFT_AXIS_DEADBAND = 0.1; public static final double LEFT_AXIS_DEADBAND = 0.1;
} }
public static final class ShooterConstants {
public static final int LEFT_SHOOTER_ID = 15;
public static final int RIGHT_SHOOTER_ID = 16;
public static final double SHOOTER_SPEED = 0.50;
}
} }
@@ -26,7 +26,7 @@ import edu.wpi.first.wpilibj2.command.RunCommand;
import frc4388.utility.controller.VirtualController; import frc4388.utility.controller.VirtualController;
import frc4388.robot.commands.Swerve.neoJoystickPlayback; import frc4388.robot.commands.Swerve.neoJoystickPlayback;
import frc4388.robot.commands.Swerve.neoJoystickRecorder; import frc4388.robot.commands.Swerve.neoJoystickRecorder;
import frc4388.robot.subsystems.Shooter;
// Subsystems // Subsystems
// import frc4388.robot.subsystems.LED; // import frc4388.robot.subsystems.LED;
import frc4388.robot.subsystems.SwerveDrive; import frc4388.robot.subsystems.SwerveDrive;
@@ -56,6 +56,8 @@ public class RobotContainer {
m_robotMap.gyro); m_robotMap.gyro);
private final Shooter m_robotshooter = new Shooter(m_robotMap.leftShooter, m_robotMap.rightShooter);
/* Controllers */ /* Controllers */
private final DeadbandedXboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID); private final DeadbandedXboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID);
private final DeadbandedXboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID); private final DeadbandedXboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID);
@@ -0,0 +1,25 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc4388.robot.subsystems;
import com.ctre.phoenix6.hardware.TalonFX;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class Shooter extends SubsystemBase {
private final TalonFX leftShooter;
private final TalonFX rightShooter;
/** Creates a new Shooter. */
public Shooter(TalonFX leftShooterMotor, TalonFX rightShooterMotor) {
leftShooter = leftShooterMotor;
rightShooter = rightShooterMotor;
}
@Override
public void periodic() {
// This method will be called once per scheduler run
}
}