Go to Post It isn't what you're given that makes it awesome. It's what you do with it. - JosephC [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-01-2009, 19:10
Dr Nick Dr Nick is offline
Registered User
FRC #0501 (The Powerknights!)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Manchvegas NH!
Posts: 24
Dr Nick has a spectacular aura aboutDr Nick has a spectacular aura about
Send a message via AIM to Dr Nick
Unhappy WindRiver WPILib problems

Over the past few days I've been trying to get my head around the Windriver IDE and more specifically, trying to get access to the WPILib files. For instance, in the SimpleTracker sample, in order to change the tracking parameters, you need to edit the TrackAPI.cpp file but as far as I can tell that file is not in the project. I'm probably missing something obvious here but can someone explain what I need to do?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-01-2009, 00:14
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: WindRiver WPILib problems

I don't think you would need to change the TrackAPI.cpp file. All of the source files are pre compiled into WPILib.a. You can download the WPILib source files to look at the code, and you can probably compile it, but I don't think that would be necessary. What parameters are you trying to change?
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #3   Spotlight this post!  
Unread 12-01-2009, 22:23
Dr Nick Dr Nick is offline
Registered User
FRC #0501 (The Powerknights!)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Manchvegas NH!
Posts: 24
Dr Nick has a spectacular aura aboutDr Nick has a spectacular aura about
Send a message via AIM to Dr Nick
Re: WindRiver WPILib problems

Well, looking back at the Tracker program, the values for the green are set in the user routine portion so I don't actually need to edit the WPILib stuff for that. What I'm wondering is say I want to change the ArcadeDrive method to have scaling built in. Is that something that is discouraged and instead we're supposed to put a wrapper method that does the scaling and then calls ArcadeDrive? That just seems like a more complex way to do it because now your code is all spread out.

From the sounds of it though, I take it we're not supposed to modify the WPILib files (even if there is a way).
Reply With Quote
  #4   Spotlight this post!  
Unread 12-01-2009, 23:52
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: WindRiver WPILib problems

Dr.Nick,

All you have to do copy the drive function out of WPILib into a new cpp file and rename to something else, then call it in your program. Otherwise you need to download the source, compile it and then change the build properties for you project to point to your own WPILib.a instead of the pre-compiled one.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
Reply With Quote
  #5   Spotlight this post!  
Unread 13-01-2009, 07:35
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: WindRiver WPILib problems

You can use WPILib pre-compiled?

We've been compiling it every time: given the bugs we've found in the WPI code (InArea, FindColor, and GetLargestParticle so far), it is very useful to be able to modify it. What we did was go into windows explorer, and drag-drop every single CPP and H into our project. This ends up moving them all to your project's directory, and then you can freely modify them while still having a backup in c:\windriver\wpilib

Just posted a thread detailing the bugs we found, in case anyone is interested.

Last edited by Bongle : 13-01-2009 at 08:25.
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2009, 16:17
Dr Nick Dr Nick is offline
Registered User
FRC #0501 (The Powerknights!)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Manchvegas NH!
Posts: 24
Dr Nick has a spectacular aura aboutDr Nick has a spectacular aura about
Send a message via AIM to Dr Nick
Re: WindRiver WPILib problems

Ok, at this point with the drive stuff I guess I'll just do my own functions like you said Kingofl.
Anybody know a relative time frame for the next update to the WPILib? I don't want to go in and start fixing that code if an update is coming this week or something but I also don't want that to stop us from working on it.
Reply With Quote
Reply


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
Windriver LAC McGurky C/C++ 12 25-02-2009 18:38
compiling in windriver koreabell Programming 4 05-01-2009 15:32
windriver projects nickmagus Programming 4 01-12-2008 23:29
WPILib problems under linux tmbg37 Programming 2 23-01-2007 23:53


All times are GMT -5. The time now is 15:08.

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