View Single Post
  #15   Spotlight this post!  
Unread 10-01-2009, 12:58
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Finding green/pink flags

Quote:
Originally Posted by DaveD View Post
There are bugs in the current versions of FindColor, GetLargestParticle and InArea. These have been fixed at the beta level and should be published shortly along with the pink-green demo that Brad mentioned above.

Dave D
(not directly to dave D)
If you're a team that simply can't wait, you can look at GetLargestParticle and FindColor in TrackApi.cpp. Notice that GetLargestParticle never actually returns the largest particle index to the 2nd parameter. The code to return isn't there, and in the 2nd line of the function it actually blows away the pointer value so it becomes impossible to return the largest particle index. Since it's probably not a good idea to go fiddling with the supplied code unless you know what you're doing, I'll leave it as an exercise to the reader to figure out what to do.

Further, in the full-size version of FindColor, its check for success is incorrect. Rather than "if(largestParticleIndex == 0), it seems that it should be if(largestParticleIndex >= 0) in case the largest particle is not the first one.
Reply With Quote