Thread: Auto won't run
View Single Post
  #1   Spotlight this post!  
Unread 12-02-2015, 19:58
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Auto won't run

Quote:
Originally Posted by Alan Anderson View Post
Your drive motors are being commanded only once. Things will work better if you add a While around the drive code, with a Wait of 10 or 20 ms to keep the loop from eating up all the CPU time.

The Gyro Get Angle will have to be duplicated inside the loop for the 90 degree turn. (You can't communicate time-varying values into or out of a loop; they take their inputs once when the loop first begins, and produce an output once the loop finally finishes.)
Thank you so much, I did that and now the drive works perfectly!

I have another problem, if its not a bother:



After the pistons clamp, it doesn't move to the next part of the flat sequence structure. Can anyone spot the problem? I've been looking at it for the past hour.
__________________
2015 MAR District Champions




Reply With Quote