The "PIDcontroller" class creates a thread to run its calculations.
It's code looks like this (extra stuff removed so that the thread code remains):
Code:
java.util.Timer controlLoop;
...
private class PIDTask extends TimerTask {
...
public void run() {
m_controller.calculate();
}
}
public PIDController(double Kp, double Ki, double Kd, PIDSource source, PIDOutput[] output, double iperiod) {
controlLoop = new java.util.Timer();
...
controlLoop.schedule(new PIDController.PIDTask(this), 0L, (long) (period * 1000)); //starts thread
}
I haven't examined the process in depth, but this is what is written.