|
Re: Running pid loops in a separate thread.
Multithreading is possible on the cRIO, and in fact, multiple teams have utilized multithreading in their code. I know in C++ you can use pthreads to perform multithreading. I believe in the java api, you either have your class extend runnable or Threads. I'm not 100% sure on that, but you can check out the api to see what you can use. Just be careful with your stack and the memory. In Java, dealing with the stack and memory when multithreading is much simpler than in C, but you still have all of the usual caveats. In C++ you had to make sure certain variables were locked and unlocked when needed unless they were mutexed.
__________________
Team 1002: 2008-2012
Team 1648: 2012-2016
Georgia Tech Class of 2016
|