View Single Post
  #3   Spotlight this post!  
Unread 20-03-2011, 16:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Tracking down a stuttering JAG/CAM drive.

Quote:
Originally Posted by PhilBot View Post
... and then in Teleop I just do two calls.... one to read the Compressor status, and one to Stop the Compressor (normally used in response to a compressor on/off switch on the DS)

With these two VIs called once per teleop cycle, my motors go back to stuttering once a second.
You could certainly make this much more efficient.
Only call them once and only once each time the DS switch is thrown, not 50 times a second...

In general, don't call things when you don't have to and it'll save you a lot of wasted time and grief.
You will have to call things like your drive motors every time a new driver packet arrives, because those inputs change rapidly.
Other things controlled by a button or switch generally do not have to be called so often. Just when the switch or button changes.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 20-03-2011 at 17:01.
Reply With Quote