Hello, I was wondering if there is a good way to determine whether or not the code is running on the cRIO. Since I do not have the cRIO with me, I wrote an if statement that I am guessing would work.
It will return true if it is on the cRIO, false if on a PC/Mac.
Code:
//Lines 2-8 on LimitSwitches/NICompactRIOToolkit.java
public boolean iscRIO(){
if(System.getProperty("os.arch").contains("amd64") || System.getProperty("os.arch").contains("x86_64") || System.getProperty("os.arch").contains("x86") || System.getProperty("os.arch").contains("i386")){
return false;
}else{
return true;
}
}
EDIT: Code is on GitHub, this specific class is here
https://github.com/itguy51/RobotClas...IOToolkit.java
Side note: If anyone knows where to get the WPILibJ libraries as a binary, [.jar or otherwise], that would be very helpful