Skip to content

Shooter#3

Merged
micw1417 merged 3 commits intomasterfrom
shooter
Jan 17, 2026
Merged

Shooter#3
micw1417 merged 3 commits intomasterfrom
shooter

Conversation

@AlbedoLinguine
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a Shooter subsystem for a robot, adding velocity control capabilities with configurable modes and PID control.

Changes:

  • Added shooter velocity control with PID configuration and soft limits
  • Introduced ShooterModes enum for managing different shooting states (SHOOTER, REVERSE, IDLE)
  • Created a command factory method for running the shooter with specified modes

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/main/java/frc/robot/subsystems/shooter/Shooter.java Implemented Shooter subsystem with state management, motor configuration, and command creation
src/main/java/frc/robot/Constants.java Added PID constants, speed constants, and ShooterModes enum for shooter configuration
.vscode/settings.json Changed Java formatter from Spotless to RedHat extension

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

configForwardSoftLimit(ShooterConstants.maxForwardOutput, true);
configReverseSoftLimit(ShooterConstants.maxReverseOutput, true);
config.applyTalonConfig(motor);
this.setConfig();
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setConfig() method is called twice: once by the parent constructor and again explicitly here. This creates a new ShooterConfig instance that overwrites the config after it has been applied to the motor. The explicit this.setConfig() call should be removed since the parent constructor already handles configuration initialization.

Suggested change
this.setConfig();

Copilot uses AI. Check for mistakes.
public static class ShooterConfig extends Config {
public ShooterConfig() {
super("Shooter", ShooterConstants.id, Constants.canbus);
@Getter
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shooterState field has a getter but no setter, yet it is initialized to IDLE and never updated. Consider either adding logic to update this state based on the current shooter mode, or adding a setter if external updates are needed.

Suggested change
@Getter
@Getter
@Setter

Copilot uses AI. Check for mistakes.
Comment on lines +67 to +79
SHOOTER(shooterSpeed, 1.0),
REVERSE(reverseSpeed, -0.5),
IDLE(idleSpeed, 0.0);

public AngularVelocity speed;
public double output;

ShooterModes(AngularVelocity speed, double output) {
this.speed = speed;
this.output = output;
}

}
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation in the ShooterModes enum. The enum constants and their members use deeper indentation (12 spaces) compared to the standard 4-space indentation used elsewhere in the codebase.

Suggested change
SHOOTER(shooterSpeed, 1.0),
REVERSE(reverseSpeed, -0.5),
IDLE(idleSpeed, 0.0);
public AngularVelocity speed;
public double output;
ShooterModes(AngularVelocity speed, double output) {
this.speed = speed;
this.output = output;
}
}
SHOOTER(shooterSpeed, 1.0),
REVERSE(reverseSpeed, -0.5),
IDLE(idleSpeed, 0.0);
public AngularVelocity speed;
public double output;
ShooterModes(AngularVelocity speed, double output) {
this.speed = speed;
this.output = output;
}
}

Copilot uses AI. Check for mistakes.
import frc.robot.Constants.ShooterConstants;
import frc.robot.Constants.ShooterConstants.ShooterModes;
import frc.robot.Constants.ShooterConstants.ShooterState;
import frc.team5431.titan.core.misc.Logger;
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Logger import from frc.team5431.titan.core.misc.Logger is added but never used in this file. Consider removing this unused import.

Suggested change
import frc.team5431.titan.core.misc.Logger;

Copilot uses AI. Check for mistakes.
oops

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@frc5431 frc5431 deleted a comment from Copilot AI Jan 17, 2026
Copy link
Contributor

@micw1417 micw1417 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ur so cool make this the IO paradigm they want later

@micw1417 micw1417 merged commit de672bf into master Jan 17, 2026
2 checks passed
@micw1417 micw1417 deleted the shooter branch January 22, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants