View Single Post
  #3   Spotlight this post!  
Unread 01-02-2007, 15:56
Metalgod4eva Metalgod4eva is offline
Registered User
None #0870
 
Join Date: Jan 2007
Location: Southold
Posts: 7
Metalgod4eva is an unknown quantity at this point
Re: Programming with Two CMU Cams

Quote:
Originally Posted by Kickmyassman View Post
You'll probably want to just take the camera.c and tracking.c (and their related .h files) and make a copy. Then change all of the static and extern variables to slightly different names. Then just call the camera handler and the servo track in User routines. http://kit.kitkorp.com/frc_camera_doublecamera.zip Shows the laziest of the lazy version of this code. There are some changes marked with "Brian" in the tracking2.h, tracking2.c, and tracking.h to limit the scope of each camera to half on either side, and reverses so they each start in the middle and spread out.
Its never a great idea to name some slightly different for better read ability use _. Like if I had a function that writes I should name it write_function. Same with headers and source files. Unless its local variables dont just add a 1 or a random X. It will save you the headache in the long run.