Go to Post Kickoff in Australia is an overnight party! - timytamy [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 10-02-2009, 11:51
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 469
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Two of Five encoders are giving identical values

Quote:
Originally Posted by 1jbinder View Post
Thanks for this insight. I made the code work. When you have a second could you explain why we need to do this in our code, but the library does not have to in encoder.cpp
Encoder.cpp inherits from CounterBase, so variables and constants defined in CounterBase can be referenced from within the Encoder without the need for explicit namespace references.

Your code, however, was presumably in an object which was not inheriting from CounterBase, so the explicit references are needed so the compiler knows where to find the value for k1X, k2X, k4X, etc...
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"
Reply With Quote
 


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
Team Swag? What are you giving out? Moheeb698 General Forum 18 03-03-2008 12:56
Are two speed transmissions worth it? thefro526 Technical Discussion 43 19-04-2007 21:16
Why are four states needed with Quadratuer encoders? Issues Programming 14 11-11-2005 15:02
Acceleration Sensor Connected, but values are odd.... Leav Electrical 7 04-02-2005 15:28


All times are GMT -5. The time now is 13:16.

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