-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Elevator #7
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
| // FX Access objects | ||
| TalonFXConfigurator configuratorLeft; | ||
| TalonFXConfigurator configuratorRight; | ||
| StatusSignal<Double> currVelocites; |
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.
The elevator is going to primarily be controlled on position not velocity - we will probably want something like mainPosition and followPosition in the inputs
Can leave a velocity if desired (and using the left main one makes sense) but will need to add positions
| configuratorRight.apply(ElevatorConstants.getRightFXConfig());; | ||
|
|
||
| // Attach status signals | ||
| currVelocites = talonFxLeft.getVelocity(); |
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 both positions here as status signals
| public void updateInputs(ExiterIOInputs inputs) { | ||
| inputs.velocityLeft = currLeftVelocity.refresh().getValue(); | ||
| inputs.velocityRight = currRightVelocity.refresh().getValue(); | ||
| inputs.velocites = currVelocites.refresh().getValue(); |
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.
use BaseStatusSignal.refreshAll() syntax to reduce CAN bus calls - 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.
Add in the absolute position from the analog input here to the inputs
| // private MotionMagicVelocityVoltage velocityRequests = | ||
| // new MotionMagicVelocityVoltage; | ||
|
|
||
| public ExiterIOFX() { |
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 add a zero() method to the I/O layer
This subsystem is going to zero using an analog input that gives us the position of the final stage - the analog input can be read, compared to a constant and used to write to the position of both talonFX's
| return Set.of(); | ||
| } | ||
|
|
||
| public double getSpeeds() { |
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 not need a getSpeeds() or atSpeed() methods for the elevator as it is position-based
No description provided.