Notifier fixes (impacting PIDController)

We had been having a lot of issues with PIDController. While it generally worked, we were seeing weird sampling times (not always what we specified) and very unreliable behavior either when deleting PIDController objects or when reloading our code via the Windriver Debug (download to RAM) interface.

We discovered a few issues in the Notifier class, which the PIDController class uses to implement a significant portion of its functionality.

First, if you are having issues like your PIDController not seeming to run (get samples nor set motor values) after reloading code through the debug interface (this was our worst issue), the fix is fairly simple:

Go to the debug settings dialog (Run->Open Debug Dialog), click the “Downloads” tab, select your program file in the list, click Edit Button. Make sure that “Download Even When File Not Modified” checkbox is checked. Then click “Advanced Options”. In the new dialog, make sure that “do not unload the existing module” is unchecked.
“OK” out of the settings dialogs, ensure that “reload” is checked in the main Debug Dialog", then click Apply.

Reboot robot, reload code, and you should be good from there out.

If you are getting tripped up by problems when deleting PIDControllers (usually the same symptom as above - subsequent PIDController use will result in no actual calls to your PIDSource or PIDOutput), or are seeing issues of odd sampling periods when using multiple PIDControllers at once, the fix is more involved. You’ll need to modify your WPILib and rebuild it or wait for an updated version to be released.

The gory details and a patch to fix are here:
http://forums.usfirst.org/showpost.php?p=26189&postcount=15

Please note that I am not officially associated with WPILib maintenance in any way – this is just something that worked to fix issues for our team – I hope it will be useful to others.