View Single Post
  #5   Spotlight this post!  
Unread 16-02-2012, 21:42
CRLS97 CRLS97 is offline
Registered User
FRC #0097
 
Join Date: Jan 2011
Location: Cambridge
Posts: 28
CRLS97 is an unknown quantity at this point
Re: robot drive isn't running fast enough...

Quote:
Originally Posted by Greg McKaskle View Post
Neither case structures nor the loop have much overhead. But if you add code that delays teleop you will see this. If this happens using a loop, it isn't actually the loop that is the problem.

In this case, the issue is that the Mecanum is only called when button 1 is pressed. I can't see the code in the other case, but assume it is not calling the Mecanum Update. If you call teleop but it doesn't call Update for 100ms, that will still result in the safety mechanism halting the motors.

Greg McKaskle
Quick question when you say it doesn't update the Mecanum (for the code above)- just to clarify, you mean it has to update it in any way possible and it won't matter if in one case statement I have Arcade Drive and another Tank Drive? but they're still coming from the same Drive Ref.? As long as the Drive Ref gets some sort of update within every 100ms it's good, correct?