|
Re: CPU usage 100% & twitchy robot?
I don't think the behavior has much to do with the teleop code. To see how often it is being called, you may want to put the Elapsed Times VI into teleop. You can find it in the support folder in your project window.
I think the twitch is likely caused by the robot drive motors being updated less than every 100ms. The next issue is to find the code that runs so often or takes so long that it slows down teleop. One place to look is vision, the other is periodic tasks. Finally, Since I can't see the code run in the other case of the button 5 switch, it could be that it is sleeping for a long time and causing the issue, but I suspect this isn't the case.
Greg McKaskle
|