-
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
Elevator! #21
Conversation
inputs.followMotorTemp = followMotorTemp.getValue(); | ||
|
||
SmartDashboard.putNumber("Elevator motor position in inches", leadMotor.getPosition().getValue() * Constants.ELEVATOR_INCHES_PER_ROTATION); | ||
SmartDashboard.putNumber("Elevator motor velocity", + leadMotor.getVelocity().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.
smart dashboard no good :c
//elevatorFollower.getEncoder().setPosition(position); | ||
} | ||
public void setElevatorVoltage(double voltage) { | ||
leadMotor.setControl(withVoltage.withOutput(voltage)); |
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.
dot withEnableFOC true dot with OverrideBrakeDurNeutral true
slot0.kD = 0; | ||
slot0.kV = 0; | ||
slot0.kS = 0; // Approximately 0.25V would get the mechanism moving | ||
slot0.kG = 0; |
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.
delete non default values
private final TalonFX leadMotor; | ||
private final TalonFX followMotor; | ||
private final VoltageOut withVoltage; | ||
private final MotionMagicVoltage motionMagicRequest = new MotionMagicVoltage(0); |
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.
could move these to above the functions they're used in for clarity's sake
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.
small nitpicks for this one too
-added .withEnableFOC(true).withOverrideBrakeDurNeutral(true) to motion magic stuff -removed smart dashboard references -deleted pid values being set to 0 because they default to 0
Good! |
Elevator subsystem code for review