Skip to content

Conversation

@ronansoergel9
Copy link
Contributor

No description provided.

Copy link
Member

@spellingcat spellingcat left a comment

Choose a reason for hiding this comment

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

🧗

Comment on lines 41 to 47
//not sure about these implementations, some issues with "static reference to non-static method"
public Command climbUp() {
return this.run(
() -> {
ClimberIO.setClimberPosition(MAX_ANGLE);
});

Copy link
Member

Choose a reason for hiding this comment

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

so a static method/variable is a method/variable that is shared across all instances of an object. so for example if we have multiple rollerio objects but store a static variable in the rollerio class, all of those rollers would be able to access it. we denote a call to something static by using the class name instead of a local variable name, which is what you've done here by capitalizing Climber

Copy link
Member

Choose a reason for hiding this comment

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

however, setClimberPosition isn't actually marked as a static method so it gets mad when it thinks you're trying to call something statically (by using the class name) when it isn't static

Copy link
Member

Choose a reason for hiding this comment

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

better explanation here: https://www.baeldung.com/java-static (sections 1-3 and 6)

ClimberIO climberIO;
ClimberIOInputsAutoLogged climberInputs = new ClimberIOInputsAutoLogged();

public ClimberSubsystem() {}
Copy link
Member

Choose a reason for hiding this comment

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

you have 2 constructors


//member variables here?

public ClimberSubsystem(ClimberIO climberIO) {
Copy link
Member

Choose a reason for hiding this comment

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

remember to create the climbersubsystem in Robot.java (L263)

intake = new LintakeSubsystem();
shooter = new TurretSubsystem();
climber = new ClimberSubsystem(); // TODO climber
climber = new ClimberSubsystem();
Copy link
Member

Choose a reason for hiding this comment

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

make sure to pass a climber io into this constructor as well


@AutoLog
public static class ClimberIOInputs {
public double climberPosition = 0.0;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public double climberPosition = 0.0;
public double motorPositionRotations = 0.0;

you named it motorPositionRotations elsewhere

private Notifier simNotifier = null;
private double lastSimTime = 0.0;

public HoodIOSim(CANBus canbus) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public HoodIOSim(CANBus canbus) {
public ClimberIOSim(CANBus canbus) {

it gets mad at you when you try to create a class that doesn't match the file name

return this.run(
() -> {
climberIO.setClimberPosition(MAX_EXTENSION_METERS);
wait(1000);
Copy link
Member

Choose a reason for hiding this comment

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

so waiting like this is a bit dangerous because it pauses all the code running in this thread (which is pretty much everything). i think what i'd do is just make extend and retract commands which set it to max position and min position respectively - we will handle figuring out which position it goes to and when through triggers elsewhere in the superstructure

@spellingcat
Copy link
Member

also be sure to run a build sometime soon so the formatter runs

// null (and we need it to be not null)
if (climber == null)
climber = new ClimberSubsystem(); // TODO new ClimberSubsystem(new ClimberIO() {}) and such
// climber = new EmptyClimberSubsystem(new ClimberIO(canivore) {});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// climber = new EmptyClimberSubsystem(new ClimberIO(canivore) {});
climber = new EmptyClimberSubsystem(canivore);

super(new ClimberIO(canbus));
}

public Command climbUp() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public Command climbUp() {
@Override
public Command extendClimber() {

make sure this method has the same name as the method in ClimberSubsystem, and that there's the @OverRide annotation above it. this makes sure that when we call extendClimber on an EmptyClimberSubsystem, it does it the EmptyClimberSubsystem's way and not the default ClimberSubsystem's way

return this.idle();
}

public Command climbDown() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public Command climbDown() {
@Override
public Command retractClimber() {

Copy link
Member

Choose a reason for hiding this comment

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

add something here that binds it to a button - so like driver.x().onTrue(extend climber) and driver.y.onTrue(retract). this might change later but we can just do this for testing

@spellingcat
Copy link
Member

i'll handle the merge for you

@spellingcat spellingcat requested a review from SCool62 February 8, 2026 20:55
@spellingcat spellingcat merged commit 788ac5f into main Feb 8, 2026
2 checks passed
@spellingcat spellingcat deleted the Ronan branch February 8, 2026 20:55
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.

3 participants