Go to Post Rules are after all rules. They don't have to make sense. - ChrisH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-01-2006, 18:29
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
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)
Call the function only once from your Initialize function and WPILib will start checking the status of the pressure switch every 500ms and operate the compressor when needed. The compressor should be connected to a spike connected to the specified relay port.

You can pick up the new version from the WPILib web site.

Enjoy...
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #2   Spotlight this post!  
Unread 22-01-2006, 20:55
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
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:
  1. Modified Motor function to be aware of the deadband in the Victor 884 speed controllers. The Victor 884 has a built-in deadband that runs from 117-137 of PWM values sent to it. The Motor function will now take values from 0-127 and 0-(-127) and scale them to fit into the actual working range of the Victor which is 23-116 and 138-232. This means that values sent to the motors will tend to be more continuous without the discontinuity in the range. The Motor function is used by Drive and Motors so if you use these functions, the change will be seen in those functions as well.
  2. There is another function added,
    Code:
    unsignd char GetPacketNumber(void)
    that returns the OI packet number. Each time a new packet is received from the master processor this number is incremented. It is only a 8 bit value so it wraps around every 256 packets, but it provides an indication of when there is new data received.
Let me know if you find any problems, particularly with the Motor change. I think this will help - it did for some motors controlled by PID loops for us. There were too many conflicting controls and was getting very confusing.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #3   Spotlight this post!  
Unread 23-01-2006, 15:08
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
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"
  #4   Spotlight this post!  
Unread 23-01-2006, 15:55
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: New version of WPILib

Quote:
Originally Posted by dcbrown
Tried to download the zip file, got the following error:

"You don't have permission to access /~bamiller/WPILib/WPILib060122.zip on this server"
Sorry about that... it's fixed now.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #5   Spotlight this post!  
Unread 23-01-2006, 16:23
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: New version of WPILib

Got it. Thanks!

DCBrown
  #6   Spotlight this post!  
Unread 29-01-2006, 19:33
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: New version of WPILib

Quote:
Originally Posted by BradAMiller

...Modified Motor function to be aware of the deadband in the Victor 884 speed controllers. The Victor 884 has a built-in deadband that runs from 117-137 of PWM values sent to it. The Motor function will now take values from 0-127 and 0-(-127) and scale them to fit into the actual working range of the Victor which is 23-116 and 138-232. . .
Does this change also effect SetPMW()?

Regards,
DCBrown
  #7   Spotlight this post!  
Unread 30-01-2006, 08:43
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: New version of WPILib

Quote:
Originally Posted by dcbrown
Does this change also effect SetPMW()?

Regards,
DCBrown
No - the SetPWM function still sends whatever value you give to the PWMs. That way you can use the Motor(port, value) function to get the scaled version, and SetPWM(port, value) to get the unmodified output version.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #8   Spotlight this post!  
Unread 04-02-2006, 13:16
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
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.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #9   Spotlight this post!  
Unread 04-02-2006, 17:45
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: New version of WPILib

Quote:
Originally Posted by BradAMiller
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.
Brad,

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
  #10   Spotlight this post!  
Unread 04-02-2006, 18:03
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: New version of WPILib

Quote:
Originally Posted by Joe Hershberger
Brad,

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
WPILib is built with the version 7.20 of MPLab and 2.40 of the compiler. The newer tools generate a different output file format, and do some (possibly) incompatible optimizations with interrupt handlers. The IFI code which is included with WPILib is also on the older tools and also prevents the use of the new compiler.

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.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #11   Spotlight this post!  
Unread 04-02-2006, 18:11
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: New version of WPILib

Quote:
Originally Posted by BradAMiller
WPILib is built with the version 7.20 of MPLab and 2.40 of the compiler. The newer tools generate a different output file format, and do some (possibly) incompatible optimizations with interrupt handlers. The IFI code which is included with WPILib is also on the older tools and also prevents the use of the new compiler.

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.
Brad,

Thanks for the quick response!

-Joe
  #12   Spotlight this post!  
Unread 05-02-2006, 12:31
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
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?
  #13   Spotlight this post!  
Unread 05-02-2006, 21:55
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: New version of WPILib

Quote:
Originally Posted by TubaMorg
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?
You should also replace the UserAPI.h file to get the new functions to be available in your version of EasyC. Then if you reference the function there won't be any warnings.

There are additional functions in Builtins.h that you might also want to use. They are documented (mostly) in the PDF file.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #14   Spotlight this post!  
Unread 07-02-2006, 08:36
Kruuzr Kruuzr is offline
Mentor - electrical, software
AKA: Steve Cote
FRC #1922 (Ozram)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Henniker, NH
Posts: 33
Kruuzr has a spectacular aura aboutKruuzr has a spectacular aura about
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
  #15   Spotlight this post!  
Unread 07-02-2006, 10:11
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: New version of WPILib

Quote:
Originally Posted by BradAMiller
You should also replace the UserAPI.h file to get the new functions to be available in your version of EasyC. Then if you reference the function there won't be any warnings.

There are additional functions in Builtins.h that you might also want to use. They are documented (mostly) in the PDF file.

Oh yeah! Compiles and runs fine now, thanks!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 13:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi