View Single Post
  #8   Spotlight this post!  
Unread 23-02-2012, 16:35
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Help me understand PIDController::OnTarget()

Quote:
Originally Posted by jwakeman View Post
I think I will add my own OnTarget implementation to the WPILib and recompile it.
Just override the class (or copy it) - we can't recompile the lib and even if we could the FIRST infrastructure checks the MD5 checksum.

Quote:
Originally Posted by jwakeman View Post
I think the reason they are part of the critical region is that they are accessed in the calculation of the output of the controller and can also be modified at any time by the application threads via methods such as this one.
True but these class members are native machine word-sized thus changing them is an atomic operation in this context. It may not be desirable but it won't screw up.

HTH
__________________
Fast, cheap or working - pick any two!
Reply With Quote