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

made it to where lift can not go up if the limit switch hasn't been p… #133

Conversation

Griffin9881
Copy link
Contributor

…ressed

Pull Request


Issue Number

Closes #132

Comments

@Griffin9881 Griffin9881 self-assigned this Mar 18, 2024
@Griffin9881 Griffin9881 linked an issue Mar 18, 2024 that may be closed by this pull request
if (leftLimitSwitch.isPressed() && leftLiftEncoder.getPosition() != 0) {
leftLiftEncoder.setPosition(0);
if (leftLimitSwitch.isPressed()) {
if (leftLimitSwitchBeenPressed == false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just do switchPressed = true every time the switch is pressed, add this if statement adds lines of code but doesn’t change the outcome. In other words, I would put this back as it was and only add the setting of the Boolean var to the existing if statement

@Griffin9881 Griffin9881 deleted the 132-fix-lift-from-going-up-if-it-hasnt-hit-limit-switch branch March 19, 2024 21:58
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.

Fix Lift from going up if it hasnt hit limit switch
2 participants