View Single Post
  #2   Spotlight this post!  
Unread 17-08-2012, 16:41
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Determining if code is on cRIO

I don't see why this would be helpful. Code I'd write to run on the cRio and code I'd write to run on a PC would be different in big enough ways that I don't think I'd ever need to check whether the code is on the cRio from the program itself. Not only are the Java versions different when comparing the cRio to the PC (Java ME vs Java SE), most of the libraries that work on one would not work on the other (SmartDashboard and javacv would never be able to run on the cRio, and WPILibJ uses too much direct hardware access to be usable on a PC). I think a better choice than having a runtime check for whether or not the program is running on the cRio would be to simply write the program for the platform it's being deployed on.
Reply With Quote