-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Climb Subsystem #6
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
Conversation
|
|
||
| @Override | ||
| public void zero() { | ||
| relSetpointOffset = ExampleConstants.kZeroTicks; |
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.
We should be able to actually write to the encoder as we will have an encoder on the shaft that tilts the cage in (using a winch) instead of saving off a zero
| @Override | ||
| public void periodic() { | ||
| // Read Inputs | ||
| io.updateInputs(inputs); |
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 processInputs(), see example subsystem
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.
will need to update/process both sets of inputs
| return Set.of(); | ||
| } | ||
|
|
||
| public enum ClimbState { |
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.
Likely will end up having more states, but we probably don't know enough yet to write them
| private final ClimbWheelIO wheelIo; | ||
|
|
||
| private final ClimbArmIOInputsAutoLogged inputs = new ClimbArmIOInputsAutoLogged(); | ||
|
|
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.
Need to add wheelIOInputsAutoLogged as well
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.
may want to rename so it is clear which is armInputs and which is wheelInputs
| public void setPercent(double pct) { | ||
| logger.info("Setting percent to {}", pct); | ||
|
|
||
| talonFx.set(pct); |
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.
Change this to a setControl with a dutycCycle request
| import org.strykeforce.telemetry.measurable.MeasurableSubsystem; | ||
| import org.strykeforce.telemetry.measurable.Measure; | ||
|
|
||
| public class ClimbSubsystem extends MeasurableSubsystem implements ClosedLoopPosSubsystem { |
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.
Assuming most of these are because you aren't done yet but you'll need methods like the following:
- setSpeed() for the wheels
- startClimb() to initiate state machine
- isClimbFinished() to check state
…l color decisions
No description provided.