Go to Post Who cares about the score? The score is just numbers on a board, the exciting part is watching the robots interact and seeing robots( and more importantly, people) do the impossible. - Herodotus [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-01-2013, 01:19
zsnow's Avatar
zsnow zsnow is offline
Head of Satire
AKA: Zachary Snow
FRC #2122 (Team Tators)
Team Role: Programmer
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Boise, Idaho
Posts: 17
zsnow has a spectacular aura aboutzsnow has a spectacular aura about
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.

Last edited by zsnow : 15-01-2013 at 01:23.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2013, 08:16
linuxboy linuxboy is offline
Registered User
AKA: Oliver Graff
FRC #3780
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: MI, USA
Posts: 217
linuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud of
I would file a bug with the tracker on firstforge.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-01-2013, 01:42
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Bug in WPILib

Quote:
Originally Posted by linuxboy View Post
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-01-2013, 18:43
zsnow's Avatar
zsnow zsnow is offline
Head of Satire
AKA: Zachary Snow
FRC #2122 (Team Tators)
Team Role: Programmer
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Boise, Idaho
Posts: 17
zsnow has a spectacular aura aboutzsnow has a spectacular aura about
Re: Bug in WPILib

I have submitted this to the WPILib tracker.

http://firstforge.wpi.edu/sf/tracker..._bugs/artf1583
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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