-
Notifications
You must be signed in to change notification settings - Fork 0
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
Superstructure #2
Conversation
not much
We worked on this. This is our first version. We think that we included all the necessary functions (looked at 2022 for reference). - Suhaan and Jake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finish this file. Use enums to store position data. https://github.com/FRC5190/2023CompetitionSeason/blob/master/src/main/java/org/ghrobotics/frc2023/Superstructure.java#L122
follower_.restoreFactoryDefaults(); | ||
follower_.setInverted(false); | ||
follower_.setIdleMode(CANSparkMax.IdleMode.kCoast); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add follower_.follow(leader_);
follower_.follow(leader_); |
io_.current = follower_.getOutputCurrent(); | ||
|
||
if (io_.wants_zero) { | ||
io_.wants_zero = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation
|
||
// Constants | ||
private static final class Constants { | ||
public static final double kTolerance = 0; // NEED TO UPDATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final double kTolerance = 0; // NEED TO UPDATE | |
public static final double kTolerance = 0.5; // NEED TO UPDATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need a Position way to do the climber set percent should work just fine and maybe we can use PID with trapezoidal to ensure smooth acceleration and movement
} | ||
|
||
//get, set % output on intake. parameter is percent output [-1, 1] | ||
public void setIntakePercent(double value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getter methods should be before the setter
} | ||
|
||
//get, set % output on intake. parameter is percent output [-1, 1] | ||
public void setIntakePercent(double value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void setIntakePercent(double value) { | |
public void setPercent(double value) { |
Simplify method names (for get method as well) because when we call it in superstructure.java we're gonna have the intake object already. intake_.setPercent(value);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good progress, I have left some comments. I did not get time to test the simulation but I will take a look soon.
Some overarching things: make sure to format the file well (low importance).
… into superstructure
Changed code to work with 2 motors(i hope)
LGTM |
superstructure v1 edits (intake code)