View Single Post
  #5   Spotlight this post!  
Unread 10-10-2014, 16:35
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: Parallel loops vs. One loop?

Your code design sounds fine.
That's how we also implement most complex robot functions.

With that style you can save some processing overhead by reducing how fast you check the global variable. For instance, a human button press can be checked more slowly, such as every 100ms, and the human probably won't notice any lag.

But measure how long everything is taking first. You may find a coding error elsewhere.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 10-10-2014 at 21:46.
Reply With Quote