RobotCasserole1736 / RobotCasserole2016

Robot Source Code for 2016 FRC Game
2 stars 0 forks source link

Write Climb Routine Class #26

Closed gerth2 closed 8 years ago

gerth2 commented 8 years ago

Add a class to execute the climb routine.

Reference the controller mapping for basic info on how to execute it.

In general, expect some number of motors driving the winch, and some number of motors driving the tape measure (check with CAD and climb team).

While the climb-enable button is held down, allow the tape-measure extension/retraction joystick axis to control the extension or retraction of the tape measure. The tape measure should be able to run in either direction, but should not extend past the max extension point. This point will be measured by a sensor - coordinate with CAD and climb team and electrical to determine what kind of sensor it is and how to interface with it.

Also while the climb-enable button is held down, allow the winch retraction motor to run in the forward direction only. The motor's speed should be relative to the square of the absolute value of the retraction motor control axis. This is to ensure fine-control at slow speed but still allow for full-speed retraction (ask Chris if questions). Absolute value ensures the motor will only run in one direction.

Running the winch motor in the wrong direction will create magic smoke. Be sure it doesn't happen.

If the climb-enable button is ever released, all climb motor outputs should go to zero.

gerth2 commented 8 years ago

(Almost) Done in record time! Needs testing and verification of motor controller indexes.

gerth2 commented 8 years ago

One thing I had forgotten from last night - we will need to read in the value of a sensor (using DigitalInput) to know when the tape measure is fully extended. If fully extended, only allow the motor to run in the reverse direction.

gerth2 commented 8 years ago

Sensor added last night, double checked logic. Integration was done - still need to verify all controller indicies (some still up in the air per electrical last night)

gerth2 commented 8 years ago

Please check comment added on #28 .