|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Re: New version of WPILib
Quote:
There are a few functions in WPILib which are hard for programmers to use, but easy for EasyC to automatically generate. These are two of those functions. The function: InitializeCamera(CameraInitializationData *c); that you can call passing the address of the camera initialization structure. This is probably easiest for you to use. The other function: InitCamera(unsigned char cameraInitIndex); was intended for EasyC. It assumes that there is an array of those structs and the argument is the index to the one you want to use. My suggestion is to initialize a structure with the camera parameters you want to use and call InitializeCamera. It's actually called from inside of InitCamera anyway. The other functions to use the camera data are: CaptureTrackingData(...) - this is the one you described and TPacket *CopyTrackingData(void); Is the function that I intended hand-coding programmers to use. This returns a pointer to a static structure containing a TPacket inside of WPILib. When you call the function, it turns off interrupts, grabs the most recent packet, and puts it into the static structure - then returns its address. Then you can write code like this: TPacket t = CopyTrackingData(); conf = t->confidence; which seemed to be pretty convenient. Last edited by BradAMiller : 07-02-2006 at 20:30. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Welcome to the WPILib forum | BradAMiller | Programming | 22 | 25-03-2008 22:44 |
| WPILib - Library for robot programming | BradAMiller | Programming | 7 | 21-06-2006 03:12 |
| openFIRST Project Announces Pending Deadline for End of Support for Old Versions | Timothy D. Ginn | FIRST-related Organizations | 0 | 11-07-2005 22:40 |
| Flash Version of Playing Field | Conor Ryan | General Forum | 49 | 30-01-2005 20:08 |
| Does anyone know if we can use the version of Backburner from the 3DSMax trial ver? | lnxpenguin4ever | 3D Animation and Competition | 2 | 26-01-2005 19:58 |