frc5431 / RobotCode2017

Code for Robot 2017 Themis
0 stars 1 forks source link

Autonomous needs to be modified for Encoders #7

Open UsaidPro opened 7 years ago

UsaidPro commented 7 years ago

Currently, the autonomous code uses time-based which is inaccurate. Please change it to use encoder values instead. You need to set the FeedbackDevice on the DriveBase CANTalons (figure out which ones the encoders are plugged into) and also ConfigEncoderCountsPerRev to 1024. To get the position of the encoder, use GetPosition. Try to convert the position to inches by using the diameter of the wheels and math There should be another reset function to reset the encoder in the CANTalon object. Find it.

Using the knowledge above, change all the autonomous routines to use encoders