FRC Team 5517's repository for the 2017 game, Steamworks.
See the Official WPILib Java documentation
Also: Command-Based Programming
Follow the steps in this WPILib ScreenSteps tutorial (ignoring C++ steps).
This is in the tutorial also, but I thought I'd just throw this in here.
- Open Eclipse
- Select "Help" on the top menu bar
- Click "Install New Software"
- Click "Add..." at the right of "Work with" slot
- Name: FRC Plugins
- Location: http://first.wpi.edu/FRC/roborio/release/eclipse/
- Click "OK"
- Agree with terms
- Click "Finish"
Note: You need to install the FRC Plugins before you do the below steps.
- Ensure you have git installed - if not, get it from: https://git-scm.com/downloads
- Open the command line program (Windows: Git Bash, Mac: Terminal)
- Navigate to your Eclipse workspace folder (whatever you chose when opening Eclipse):
cd ~/FOLDER
(Possibly:Documents/workspace
orworkspace
) - Run
git clone https://github.com/frc5517/Steamworks2017.git
- Enter GitHub username and password if prompted
- Once it is cloned, cd into the directory (
cd Steamworks2017
) - List directory contents, ensuring everything is there:
ls
- In Eclipse, go to File > Import...
- Double click Git and then Projects from Git
- Double click Existing local repository
- If "Steamworks2017" is not listed:
- Click Add... and then Browse
- Find the workspace directory, select it and click Open
- Click Search
- Check the checkbox next to the repository found (Steamworks2017) and click Finish
- Select "Steamworks2017" and click Next
- Select Import using New Project Wizard and then click Finish
- Expand WPILib Robot Java Development and double click Robot Java Project
- Enter Steamworks2017 for Project Name
- Select Command-Based Robot for Project Type
- Click Finish
Eclipse should now open the project and import the code from the repository.
You will notice there is probably an error. This is because the WPILib wizard creates the "ExampleSubsystem" and "ExampleCommand" classes. You just need to delete these to fix this error.
- Expand Steamworks2017 if it isn't already expanded
- Expand
src
- Expand
org.usfirst.frcteam5517.robot.commands
andorg.usfirst.frcteam5517.robot.subsystems
- Delete
ExampleCommand.java
andExampleSubsystem.java
from their respective directories. - The errors should now vanish.
Whenever you make changes and are ready to commit, go to command line, ensure you're in the project folder, and you can then run the git commands from there. For info on git, check out https://git-scm.com/
Ask Nathan if you need assistance.