Go to Post Cant get hair and nails done and still run a robot. - wendymom [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 23-01-2011, 06:56
tluks tluks is offline
Registered User
None #1126 (sparx)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: new york
Posts: 5
tluks is an unknown quantity at this point
Re: Encoder fixed in WPILib 2011?

Quote:
Originally Posted by ajlapp View Post
We tried it saturday and had problems.

We had defined two encoders, one encoder would get both rate and distance properly, the second encoder would only get distance.

I'll confirm with my team that we were using the newest encoder block.
We had a similar issue yesterday in java. We have a "left" encoder and a "right" encoder and only the right encoder would get rate correctly. The left encoder would return NAN. After testing a few other possibilities, we feel that we've solved the problem by only using an "even" encoder. This probably won't make sense without some pseudo code.

Encoder leftEncoder = new Encoder(args); //this will return NAN
leftEncoder = new Encoder(args); //this will return a good rate
Encoder rightEncoder = new Encoder(args); // returns NAN rate
rightEncoder = new Encoder(args); //this will return a good rate

So the reason why our right encoder was working before was because it was the second encoder we constructed....

Jhersh- Is there anything we can do to help you work/understand this issue?

Last edited by tluks : 23-01-2011 at 06:56. Reason: improving the pretend code
 


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 12:47.

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