View Single Post
  #2   Spotlight this post!  
Unread 28-01-2014, 19:50
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: May I Please Have Some Help?

Here's a few notes, based on what it seems like I would want to code to do. If you described what you wanted the robot to do, it would be much easier to review the code.

You're using PWM 3 & 4 for both RobotDrive and your Talons. This will crash immediately.
elasticEncoder is never started or used.
ledRing is never turned on.
encoders do not necessarily return an angle directly. With the current code, the Pickup Talon will be on until the encoder counts 42 ticks. If you have a 250 count encoder, this will be about 60 degrees. If you have a 360 count encoder, you don't have to worry about it.
There isn't a way to move the pickup in the opposite direction.
The encoder will start at 0 when the robot is turned on. If your pickup isn't always in the same position when you turn on, you won't get the results you want
The autonomous won't run. autonomousContinuous isn't called by the iterative framework anymore. The equivalent is autonomousPeriodic. However, you can't have delays in Periodic methods. Instead, save a time variable in autonomousInit, and then check in autonomousPeriodic if the desired time has elapsed.

Last edited by Joe Ross : 28-01-2014 at 20:48.