ligerbots / Steamworks2017Robot

LigerBots robot code for FIRST Robotics Competition Steamworks
MIT License
2 stars 1 forks source link

Hold position function for climber #25

Closed cbf66 closed 7 years ago

cbf66 commented 7 years ago

Presently our the climbing code simply sets Robot.driveTrain.rawThrottleTurnDrive(0, 0); when the limit switch is detected (or when the drive interrupts the climb).

This will likely not keep us in contact with the limit switch, and to score a point we need to (a) keep the limit switch depressed for at least 1 second, (b) ensure that's it's still depressed at the end of the match.

We should implement a PID loop to hold the drive train in place once our limit switch (which we don't have yet) is depressed, or in the alternative, a button on the farm controller to do this.

Rule excerpt about the pressure switch used to score the climb:

A. it’s minimally displaced by ½ in. (~1 cm), B. it’s pressed for a duration of at least one (1) sec, and C. it’s pressed when the Teleop Period ends at T = 0

cbf66 commented 7 years ago

The ratchet now takes care of this.