|
Re: Multithreaded programs
WPILib includes nice helper classes that can help you set up multithreading pretty easily. Take a look at Task, Notifier, and Synchronized, in particular.
The WPILib PIDController implementation uses these classes to set up a thread that periodically calculates the next output value. Take a look at PIDController.cpp to see how to use them.
|