Code for FRC Robotics team 3695.
- Coming soon!
- When the Java project has been imported into Eclipse, follow these steps to obtain the correct classpath variables.
- It is required that the above tutorials have been followed before proceeding!
- Window > Preferences > Java > Build path > Classpath variables > New
- For the "name" field, type in "wpilib" (without quotes, all lowercase) and press File...
- Then go to "C:\Users<YOUR USERNAME>\wpilib\java\current\lib" (Should be installed in "How to set up FRC's dev kit") and select wpilib.jar. Press OK
- Press New again. Type in "networktables" this time. Press File... and select networktables.jar. Press OK.
- Finally, press New again. Type in "wpilib-source". Press File... and select wpilib-source.jar. Press OK.
This step facilitates development with the robot. While optional, it allows you to hover over classes and methods to see how they work. It's pretty easy to set up.
- Find source that isn't set up yet. for example, when you hover over the word "Talon" on the line "private Talon left", it'll say something along the lines of "no source found"
- Go to "Open declaration"
- It'll now show a big, confusing white page with some form of error. Simply go to "link source" and select wpilib-source.
- It'll now show a bunch of code! Yay! DO NOT EDIT THIS CODE HOWEVER, simply close out and try hovering over the word "Talon" again. You will now see "Cross the Road Electronics (CTRE) Talon and Talon SR Speed Controller". You can hover over other FRC methods too!
- Methods should be in camelCase.
- Variables should be in camelCase.
- Classes should be in BumpyCase.
- Make sure that your IDE uses tabs, not spaces.
- Static variables should be in CAPS_LOCK.
- Please make sure to add Javadoc to your methods and static variables.
- Example:
/**
* I/O number for the arm of the robot.
*/
public static final int ROBOT_ARM = 10;
/**
* This method kills the robot. Do not attempt to
* kill the robot.
*/
public boolean doMagicalThing(int magic) {
Robot r = new Robot();
r.kill();
r.haltAndCatchFire(true);
return magic > 0;
}
- AJ Walters
- Kurtis Bowen
- Grant Walter