View Single Post
  #9   Spotlight this post!  
Unread 05-03-2010, 00:03
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Camera code does not recognize target

Are you referring to this function in target.cpp? It looks fine to me.
Code:
/**
 * Compare two targets.
 * Compare the score of two targets for the sort function in C++.
 * @param t1 the first Target
 * @param t2 the second Target
 * @returns (1, 0, or -1) for the scores of t1 > t2, t1 == t2, and t1 < t2
 */
int compareTargets(Target t1, Target t2)
{
        if (t1.m_score > t2.m_score) return 1;
        if (t1.m_score < t2.m_score) return -1;
        return 0;
}
__________________
Reply With Quote