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)

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