Closed cmarley3-14 closed 5 years ago
It looks good to me, Id say we just gotta test it on the robot to make sure everything is in order. Only concern is more of a general concern than a specific coding change but making sure that the climbing function is fully completed before moving on, and possibly preventing a driver from moving to phase 2 (or whatever the next phase is) prior to completing the previous one.
Changes Made:
Lifter:
Changed the comparison tests so that it would see if the distance was above the target height or below, and move accordingly, instead of testing if the lifter was at a certain place. Because once the lifter is in transition, it wouldn't have fit any of the cases.
LifterHight: Changed the height variables to
public
because they now need to be accessed inLifter.java
And then added extra spacing for the brackets and if statements (re-formatting).Robot: Created
AutonomousPeriodic
, which is part of the FIRST library. Added the drive controls, suck grab eject, and left climb out.Moved the code for lifting (The POV and switch statement stuff) out of
TeleopPeriodic()
and into its own functionlifterOperatorCode()
, because there's two exact same copies in both auto and teleop. Just to make the code shorter. ChangedClimb()
to a series of steps which progress by pressing start. This is because withClimb()
, one assumes that the robot will move backwards onto the platform in the short amount of time given by the quick succession of steps in such a function. The steps are more like:The driving portion of the steps was not accounted for, so the code was changed to compensate for that.
And that's the summary of the changes!