Skip to content

Conversation

@prasadbis
Copy link
Collaborator

Created a shooter subsystem.

@prasadbis prasadbis self-assigned this Nov 4, 2024
motor = new CANSparkMax(id, MotorType.kBrushless);
public RealWheel(boolean inverted, int motorID) {
motor = new CANSparkMax(motorID, MotorType.kBrushless);
motor.setIdleMode(IdleMode.kBrake);
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget to reset the motor settings to their defaults before configuration!

}

public static final class Bottom {
public static final double kp = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Remember in testing to change this. Otherwise, your pids won't be doing any work

}

@Log.NT
public double topTarget() {
Copy link
Member

Choose a reason for hiding this comment

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

topSetpoint is better and more specific here; target could refer to a set state, for instance, and setpoint is the more general term for the reference

private final WheelIO top;
private final WheelIO bottom;

private final PIDController pidTop = new PIDController(Top.kp, Top.ki, Top.kd);
Copy link
Member

Choose a reason for hiding this comment

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

WPILib PIDControllers are sendable, so you should log these. Helps the testing process massively by allowing you to change PID constants dynamically over NT

Unfortunately, feedforward isn't (though there shouldn't ever be a need to change those in the middle of a match.)

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.

4 participants