Thread: Camera bug
View Single Post
  #2   Spotlight this post!  
Unread 08-02-2012, 20:44
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 bug

The vision targeting code is a lot more complicated than what you have here. Please refer to the VisionSample2012 code. If you downloaded update 3111 from here, you should have that example code.
http://firstforge.wpi.edu/sf/frs/do/...2_update_for_c

Also, a quick scan of your code showed that you are not printing the numbers correctly.
Code:
driverOut->PrintfLine(DriverStationLCD::kUser_Line1, "Z: %n", particles->size());//output num targets
driverOut->PrintfLine(DriverStationLCD::kUser_Line2, "sumtin %f", par.center_mass_y);
If I am guessing what you are trying to do correctly, it should be: (both fields are integers).
Code:
driverOut->PrintfLine(DriverStationLCD::kUser_Line1, "Z: %d", particles->size());//output num targets
driverOut->PrintfLine(DriverStationLCD::kUser_Line2, "sumtin %d", par.center_mass_y);
__________________
Reply With Quote