View Single Post
  #4   Spotlight this post!  
Unread 20-10-2014, 14:11
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: The CCRE: A comprehensive award-winning robot code framework

Quote:
Originally Posted by Colby Skeggs View Post
Simple: we don't expose WPILib. FRC robot projects written using the CCRE access hardware through the Igneous class. This lets us smooth over any changes in WPILib.

Since the user project isn't the first thing that runs, the CCRE_Igneous_cRIO or CCRE_Igneous_RoboRIO module can register their own versions of the interface, so on the cRIO the interface is designed to work with 2014 WPILibJ, and on the roboRIO, the interface is designed to work with 2015 WPILibJ. When the user uses the "Deploy" target, it uses the roboRIO build system to download it (assuming that they have the required plugins), and when the user uses the "Deploy2014" target, it uses a heavily-modified version of the cRIO build system to download it, no plugins required.

In terms of the non-backwards-compatible hardware changes, we provide Igneous.isRoboRIO(), which lets the user program figure out which one is being used. Since a robot with the roboRIO and a robot with the cRIO would have different port numbers either way, we require that the user program chooses the correct port numbers itself. New modules such as the PCM are handled via methods such as Igneous.usePCMCompressor(), which will throw a helpful exception if used in a cRIO environment.

We've used this to make last year's code downloadable to both targets, and when our code ran on a cRIO at Girls' Generation and Rookie Rumble (offseason events), it used the exact same code that I've been downloading to a roboRIO for testing.
If I understand this correctly, backwards compatibility only applies to programs purely calling WPILib, because you wrapped it and any code dependent on the Java standard libraries will not have backward compatibility. Is that correct?

What happens when the users program tries to execute code written under Java 8, but then tries to exectute on the cRIO? For example, if the user makes a call to Java.io.socket networking classes, or uses automatic unboxing Double myVar = 5.

All are valid on the roboRio, but what happens when the user tries to run this code on a 2014 cRIO, does it have a compile error, run-time error, or work somehow?

Thanks for putting this together,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner

Last edited by NotInControl : 20-10-2014 at 14:15.
Reply With Quote