OCCRA
Go to Post Iím not decently dressed for this picture.......I have no FIRST shirt, FIRST hat or FIRST pin anywhere on me! - Rich Wong [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 02-01-2009, 11:29 PM
fdelagarza fdelagarza is offline
Registered User
FRC #2122
 
Join Date: Jan 2009
Location: Boise, ID
Posts: 1
fdelagarza is an unknown quantity at this point
Smile code example to set 4x encoder decoding mode mode

Hello,

Now with the third update the 4x mode encoder decoding should be working, I have been testing our robot encoders and it sems that the default constructor, which by default should select 4x is using 1x mode after comparing the counts with the distance

i am using this code to create the encoders:
m_baseLeftWheelEnc = new Encoder(1, 2, false);
m_baseLeftWheelEnc->Encoder::Start();
m_baseRightWheelEnc = new Encoder(3, 4, true);
m_baseRightWheelEnc->Encoder::Start();

Could you post an example of 4x encoders configuration code

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2009, 04:14 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
4933T15
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,537
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: code example to set 4x encoder decoding mode mode

Workbench Update 3 now normalizes the returned distance from an Encoder::Get() or Encoder::GetDistance() call. So 1X, 2X, 4X doesn't effect the magnitude of the result, only the resolution. You can use GetRaw() if you want the unnormalized result for some reason.

Thus I believe your encoders are really configured in 4X mode, but you are reading the normalized results.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Code error causing robot to go into programming mode. MJD Programming 14 10-30-2007 01:21 PM
FRC Camera code in YCrCb Mode? Terry Sherman Programming 9 01-25-2006 03:43 PM
Where to insert code Autonomous mode caderader Programming 5 02-18-2005 03:49 PM
Anybody have a code for an autonomous mode to go to the 50 point bar???? and... chaoticprout Programming 9 11-06-2004 11:22 AM
Simple Autonomous Mode Example deltacoder1020 Programming 5 03-08-2004 07:22 PM


All times are GMT -5. The time now is 06:55 AM.

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


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