Skip to content
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

Merged
merged 13 commits into from
Jan 26, 2024
Merged

Elevator! #21

merged 13 commits into from
Jan 26, 2024

Conversation

nmp2965
Copy link
Collaborator

@nmp2965 nmp2965 commented Jan 21, 2024

Elevator subsystem code for review

@amb2127 amb2127 requested a review from dlpond917 January 21, 2024 05:38
@amb2127 amb2127 linked an issue Jan 21, 2024 that may be closed by this pull request
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());
Copy link
Collaborator

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));
Copy link
Collaborator

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;
Copy link
Collaborator

@amb2127 amb2127 Jan 23, 2024

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);
Copy link
Collaborator

@amb2127 amb2127 Jan 23, 2024

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

Copy link
Collaborator

@amb2127 amb2127 left a 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

nmp2965 and others added 3 commits January 25, 2024 18:25
-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
@amb2127
Copy link
Collaborator

amb2127 commented Jan 26, 2024

Good!

@amb2127 amb2127 merged commit e11c2d7 into main Jan 26, 2024
1 check failed
@amb2127 amb2127 deleted the elevator! branch February 10, 2024 03:01
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.

Elevator - Write and merge initial code
3 participants