fishythefish
15-10-2012, 20:00
cRIOs are fairly expensive and we don't get new ones each year, so in order to continue demo-ing our old robots, we want to try to compile code into a JAR and run the program output through an Arduino or something instead. In particular, we want a standalone implementation of the CAN protocol so that we can at least run motors.
Since the cRIO doesn't do any of the work of compiling, it seems like it should be possible to extract the relevant source files from the SunSPOT FRC SDK and put them in a new vanilla Java project. However, nearly all the files from edu.wpi.blahblahblah end up importing from com.sun.blahblahblah and all the packages under com.sun are missing in sunspotfrcsdk/lib/wpilibj/src and their corresponding .class files are missing from sunspotfrcsdk/lib/wpilibj/build, so I can't even decompile them to get the actual source. (But everything does show up in javadoc.)
If I create a Simple Robot project using the Netbeans module, then I can import these missing classes, but if I navigate to source, Netbeans auto-generates the missing code instead since no source can be found. However, many of the the generated files are incomplete or incorrect, so they don't help. Adding the JAR files from the modules directory to classpath also does not help.
Has anyone tried messing with this, and if so, can they tell me where I can find the missing files or if there is a better solution?
Since the cRIO doesn't do any of the work of compiling, it seems like it should be possible to extract the relevant source files from the SunSPOT FRC SDK and put them in a new vanilla Java project. However, nearly all the files from edu.wpi.blahblahblah end up importing from com.sun.blahblahblah and all the packages under com.sun are missing in sunspotfrcsdk/lib/wpilibj/src and their corresponding .class files are missing from sunspotfrcsdk/lib/wpilibj/build, so I can't even decompile them to get the actual source. (But everything does show up in javadoc.)
If I create a Simple Robot project using the Netbeans module, then I can import these missing classes, but if I navigate to source, Netbeans auto-generates the missing code instead since no source can be found. However, many of the the generated files are incomplete or incorrect, so they don't help. Adding the JAR files from the modules directory to classpath also does not help.
Has anyone tried messing with this, and if so, can they tell me where I can find the missing files or if there is a better solution?