Go to Post Let's see. There's the Dean of Students, the Dean of Admissions, The Dean of Engineering, and the Dean of Kamen? Sometimes known as the Denim Dean. - Bill_B [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 28-02-2013, 23:50
jwhite jwhite is offline
Registered User
FRC #2823
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Saint Paul, MN
Posts: 69
jwhite is an unknown quantity at this point
Re: PIDController (.cpp) issues and concerns

Quote:
Originally Posted by rawrxp View Post
It's still quite simple just to make your own OnTarget() method as well as GetError(). Even though it is more redundant, it should not lock the thread like it will otherwise. Simply, use GetSetpoint() and PIDGet() from your PIDSource object to calculate the error. From there, you can tune your OnTarget() error. For example...

Code:
//PIDSource is called source, PIDController is called controller.
float error = controller->GetSetpoint() - source->PIDGet();
float tolerance = error * .05; //any percentage value
return fabs(tolerance) < 5; // a tuned value
Oh, sure, and that's what we did. I was just mentioning the troubles we had in case any listening WPILib authors were interested in fixing 'em...
 


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 22:39.

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