View Single Post
  #6   Spotlight this post!  
Unread 11-04-2012, 04:44 PM
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: [cRIO] Robot Drive... Output not updated often enough.

Sorry, I guess I am not observant enough, I see you posted your code.

Question: Why are you using Watchdog? It is disabled by default and its function has basically been replaced by the motor safety stuff put in in 2011 (I think that was the year).

I believe that I found the problem as well. It appears that your teleoperated code only runs once, instead of in a loop.

Try doing it like this:
Code:
while(isOperatorControl()) {
    ... Business code ...
}
Your motors need to be updated constantly to actually use the robot. If you want the functionality provided up there ^^^, look into IterativeRobot instead of SimpleRobot. It automatically loops teleopPeriodic().

Hopefully that helps.
__________________
All opinions are my own.
Reply With Quote