|
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.
|