Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename motor #24

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static class mapIntake {

public static class mapShooter {
public static final int PROPEL_MOTOR_CAN = 10;
public static final int SHOOT_MOTOR_CAN = 11;
public static final int SPIRAL_MOTOR_CAN = 11;
}

public static class mapStager {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/commands/PrepShooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public PrepShooter(Shooter passedShooter) {
@Override
public void initialize() {
globalShooter.setPropelVelocity(0.6);
globalShooter.setShooterVelocity(0.8);
globalShooter.setSpiralMotorVelocity(0.8);
}

// Called every time the scheduler runs while the command is scheduled.
Expand All @@ -32,7 +32,7 @@ public void execute() {
@Override
public void end(boolean interrupted) {
globalShooter.setPropelVelocity(0);
globalShooter.setShooterVelocity(0);
globalShooter.setSpiralMotorVelocity(0);
}

// Returns true when the command should end.
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/frc/robot/subsystems/Shooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
public class Shooter extends SubsystemBase {
/** Creates a new Shooter. */
TalonFX propelMotor;
TalonFX shootMotor;
TalonFX spiralMotor;

public Shooter() {
propelMotor = new TalonFX(RobotMap.mapShooter.PROPEL_MOTOR_CAN);
shootMotor = new TalonFX(RobotMap.mapShooter.SHOOT_MOTOR_CAN);
spiralMotor = new TalonFX(RobotMap.mapShooter.SPIRAL_MOTOR_CAN);
}

public void setShooterVelocity(double velocity) {
shootMotor.set(velocity);
public void setSpiralMotorVelocity(double velocity) {
spiralMotor.set(velocity);
}

public double getShooterVelocity() {
return shootMotor.get();
public double getSpiralMotorVelocity() {
return spiralMotor.get();
}

public void setPropelVelocity(double velocity) {
Expand Down