Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Bug in WPILib (http://www.chiefdelphi.com/forums/showthread.php?t=111276)

zsnow 15-01-2013 01:19

Bug in WPILib
 
After scratching my head for a while dealing with peculiar behavior, I stumbled upon what I believe to be a bug in WPILib. The PIDGet for the AnalogChannel says it returns the average voltage of the channel in its documentation. However, it returns the average value, which is quite different.

Code:

/**
 * Get the Average voltage for the PID Source base object.
 *
 * @return The average voltage.
 */
double AnalogChannel::PIDGet()
{
        if (StatusIsFatal()) return 0.0;
        return GetAverageValue();
}

I confirmed this in code by noting the disparity between GetAverageVoltage and PIDGet when output to the console.

Has anyone else seen this problem? Is the average value the standard behavior? My workaround was to subclass AnalogChannel for the time being.

I have installed all the lates updates, I am using the latest version of the reference and WPILib source, and have re-imaged the the cRIO with this year's image.

linuxboy 15-01-2013 08:16

I would file a bug with the tracker on firstforge.

jhersh 16-01-2013 01:42

Re: Bug in WPILib
 
Quote:

Originally Posted by linuxboy (Post 1215660)
I would file a bug with the tracker on firstforge.

I agree that this is a bug and I agree that you should create a tracker.

zsnow 16-01-2013 18:43

Re: Bug in WPILib
 
I have submitted this to the WPILib tracker.

http://firstforge.wpi.edu/sf/tracker..._bugs/artf1583


All times are GMT -5. The time now is 13:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi