FRCTeam2992 / Robot2023

FRC Team 2992's 2023 Robot Code
Other
1 stars 0 forks source link

[Elevator] Make elevator hold position after every move #51

Closed msonnier closed 1 year ago

msonnier commented 1 year ago

Related Issues and PRs

n/a

Issue:

Commands have to explicitly keep running after the move is complete, otherwise the elevator backdrives. This makes coding command compositions and autos MUCH harder. Make holding the elevator position the default command.

Related PRs:

Checklist

What is changing and why?

Creates new HoldElevator command including new method in subystem it uses. Elevator subsystem adds a state variable as to whether a "holdposition" has been recorded and the actual position. Every method which moves elevator has to reset that state to false -- and when holdPosition() first called it gets recorded from encoder.

How was this tested?

Not yet tested. Based on 2019 Starlord similar function.

Is there anything the reviewer of this PR needs to know to validate that this code is correct?

What do your team members need to know about this?