![]() |
New version of WPILib
There is a new version of WPILib that will automatically operate the compressor if connected in the background. You need to call:
Code:
InitPressureSwitch(unsigned char pressureSwitchPort, unsigned char relayPort)You can pick up the new version from the WPILib web site. Enjoy... |
Re: New version of WPILib
There is a new version of WPILib on the web site that has some changes that were just added today to help us with some motor control. So here you go:
|
Re: New version of WPILib
Tried to download the zip file, got the following error:
"You don't have permission to access /~bamiller/WPILib/WPILib060122.zip on this server" |
Re: New version of WPILib
Quote:
|
Re: New version of WPILib
Got it. Thanks!
DCBrown |
Re: New version of WPILib
Quote:
Regards, DCBrown |
Re: New version of WPILib
Quote:
|
Re: New version of WPILib
There is another new version of WPILib that has the following changes:
1. The capture camera packet functions now have a one second timeout. If the timeout happens, then zeros are returned for all data. 2. A bug in the servo control code was fixed where it was sending bad values when the middle digit was zero in a three digit servo value. 3. There are functions to read the backup and main battery voltages. You can get it from my website and following the links to the software. As always please post any problems that you might encounter. |
Re: New version of WPILib
Quote:
I'm attempting to compile a student's program that was written and exported from EasyC. I don't have EasyC and as such I'm using MPLab and your library to build the project. Everything goes well until the link step. It then notifies me that the "Coff file format is out of date" for the objects in the lib file. It wants to rebuild the library, but I obviously don't have the source. Naturally, Microchip changed their coff format with the new version of their compiler. I'm using version 3.01 of the compiler, which comes with version 4.01 of the linker. Can you post the source to the library so it can be rebuilt? If not, what version are you using to build the library so I can downgrade? Thanks, -Joe |
Re: New version of WPILib
Quote:
To be sure, I'd suggest switching to those versions of the tools. You can get them from the CD that was included in the kit of parts. |
Re: New version of WPILib
Quote:
Thanks for the quick response! -Joe |
Re: New version of WPILib
I've updated our EasyC with the new libraries. To test I added
InitPressureSwitch(1,2); to our code and built it. It returned no errors but a warning that the above function call had no prototype. I'm not sure how to rectify this with EasyC, any thoughts? |
Re: New version of WPILib
Quote:
There are additional functions in Builtins.h that you might also want to use. They are documented (mostly) in the PDF file. |
Re: New version of WPILib
Hi Brad...
I started coding up our full application using WPILib but I ran across a big difference between the documentation and what I assume are new functions. In the userAPI.h file, there are two camera functions: void InitCamera(unsigned char cameraInitIndex); void CaptureTrackingData( unsigned char *centerX, unsigned char *centerY, unsigned char *x1, unsigned char *y1, unsigned char *x2, unsigned char *y2, unsigned char *regionSize, unsigned char *confidence, unsigned char *pan, unsigned char *tilt); The first is obviously a changed version of InitializeCamera() and the second must be new. Could you give a quick rundown of how they work, especially the 'cameraInitIndex' parameter of InitCamera() ? And how do we set camera parameters as there is no place to set up a CameraInitializationData struct. Thanks |
Re: New version of WPILib
Quote:
Oh yeah! :D Compiles and runs fine now, thanks! :rolleyes: |
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. |
Re: New version of WPILib
Quote:
Thanks for the info Brad... I think the time lag between coding and documentation is a law of physics. :) Steve |
Re: New version of WPILib
Quote:
|
Re: New version of WPILib
There is a new version of WPILib that has better error handling for the CMUCam. It will now fail more quickly if the camera is not detected and there is a function to get the status from the camera after initialization.
You can get it at the usual place. Please post something with your results. I have tested it on a 2006 controller with the camera disconnected from the serial adapter and also with the serial adapter disconnected from the robot and both seem to work. Be sure to save the old version this close to shipping in case you don't like the results. |
Re: New version of WPILib
Hey Brad,
Where do you find BuiltIns.h ? Your efforts are appreciated. |
Re: New version of WPILib
Whoops...
It's fixed now. There was a problem with the automatic build stuff and some stuff didn't update properly. The new version is in the usual place. Brad |
Re: New version of WPILib
Not quite fixed yet!!!
I get : You don't have permission to access /~bamiller/WPILib/WPILib2007011601.zip on this server. Kruuzr Quote:
|
Re: New version of WPILib
Same here. I'm getting the "You don't have permission to access /~bamiller/WPILib/WPILib2007011601.zip on this server." as well
|
Re: New version of WPILib
Quote:
|
Re: New version of WPILib
Quote:
|
Re: New version of WPILib
I put up a new version of WPILib that exposes some of the internal functions that can reset the camera and send commands to it. Should make it easy to use the Virtual Window stuff.
http://users.wpi.edu/~bamiller/WPILib/Versions.html When you reset the camera, then send commands, tracking is turned off. You need to restart tracking by calling StartCamera(). Also you can set the camera debug mode by calling SetCameraDebugMode(1) and the commands to/from the camera will be echoed in the terminal window so you can see what it is doing. |
Re: New version of WPILib
Good Stuff. Thank you.
|
| All times are GMT -5. The time now is 15:18. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi