Go to Post FRC: more like the real world than we could ever want. - efoote868 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 02-10-2013, 02:20 PM
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Custom Robot Netbeans Libraries

After the last two years, our team has developed a few utilities to aid in our programming (namely an Xbox class and a Socket connection for a RPi). I would really like to make a Library project in Netbeans and use it in our production code.

I have however run into a few problems, which after some searching, that I haven't been able to resolve.

1) The library project needs the wpilibj.jar and squawk.jar and potentially also the networktables-crio.jar libraries depending on the classes in the library. The actual issue is making sure that adding these libraries would carry not only between computers but between Platforms. I know that the FRC plugins would know where they are, is there a way I could reference it through them?

2) How do I add a custom library to an FRC project. I searched through several dialog/property windows looking and couldn't find it... And once I DO add it, how can I ensure it will transfer easily between computers and platforms, likely referencing the NetBeansProjects directory?

Any help is greatly appreciated.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
Reply With Quote
  #2   Spotlight this post!  
Unread 02-10-2013, 03:13 PM
GreyHat GreyHat is offline
Registered User
FRC #0087
 
Join Date: Feb 2013
Location: United States
Posts: 3
GreyHat is an unknown quantity at this point
Re: Custom Robot Netbeans Libraries

One thing you could do is recompile the WPILibJ libraries from their sources including your utility classes -- although this is a fairly dirty solution. You'd have to distribute the library to those wishing to use it and have them add the libraries to the cRIO. The issue with not being able to add libraries to your project is that the platform on which it runs, the cRIO, is a static platform, and won't have extra libraries. I'm not sure if there's a [non hacky*] way to add a library that is assumed to be on the cRIO. In the end, there is no easy way to do this, unless you want to distribute sources.

*You could use a ClassLoader and reflection to access classes from the library, but then all end-users would have to take a similar path.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-11-2013, 12:44 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,547
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Custom Robot Netbeans Libraries

In the ant buildscripts, there is a variable called ${sunspot.home} which is set to the path shown in Options->Miscellaneous->FRC Configuration. If you make sure you place your library relative to the sunspotfrcsdk directory, it should work.

Note that per R16, any library you carry over from year to year must be publicly released.
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


All times are GMT -5. The time now is 07:50 AM.

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