Go to Post Someone want to channel their inner Mark Leon and do the math? - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 19-02-2012, 13:30
FourPenguins's Avatar
FourPenguins FourPenguins is offline
Back in the Game
AKA: Ed Venator
FRC #2399
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Mount Olive, NJ
Posts: 261
FourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud of
PIDSubsystem setSetpointRange Not Implemented

We just ran into this, and I wanted to put out a warning to everyone else.

The JavaDoc for the PIDSubsystem class says
Quote:
public void setSetpoint(double setpoint)

Sets the setpoint to the given value. If setRange(...) was called, then the given setpoint will be trimmed to fit within the range.
In testing, we almost destroyed some things on our shooter aiming mechanism when it ran past our range limits. After looking at the WPILibJ code, we found that the setSetpoint() method just passed the setpoint on to the PID Controller without checking the range limits. It's easy to override the method to saturate your setpoints yourself, but if you don't know you have to, you could get a nasty surprise.
__________________
MORT 11
-2005 New Jersey Regional Chairman's Award Winner
-2006 Palmetto Regional Winner
-2007 New York Regional Delphi Driving Tomorrow's Technology Award
-2008 New Jersey Regional Finalist, Chesapeake Regional Winner, Championship Event Overall Top Seed
HB 2399
-2009 Buckeye Regional Delphi Driving Tomorrow's Technology Award, Pittsburgh Regional GM Industrial Design Award
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 07:06.

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