Fix the example programs

Remove the test examples that don't do anything helpful

Fix the PacGoat and GearsBot examples to compile

Change-Id: Ic11ca7a97a5b52524fe60dc24fcec6ecfae7ebb7
This commit is contained in:
Thomas Clark
2014-08-12 14:52:22 -04:00
parent 66e1f2a184
commit d5c73c95dc
11 changed files with 17 additions and 189 deletions

View File

@@ -1,39 +0,0 @@
package $package;
import edu.wpi.first.wpilibj.networktables.NetworkTable;
/**
* An example of a network table counter.
*
* @author Team $team-number
*/
public class Robot {
private static NetworkTable table;
/**
* @param args
*/
public static void main(String[] args) {
NetworkTable.setServerMode();
NetworkTable.setTeam(190);
table = NetworkTable.getTable("SmartDashboard");
System.out.println("Started up");
long i = 0;
while (true) {
System.out.println(i);
table.putNumber("i", i);
i++;
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}

View File

@@ -1,17 +0,0 @@
package $package;
/**
* Simplest possible robot program
*
* @author Team $team-number
*/
public class Robot {
/**
* @param args Input....
*/
public static void main(String[] args) {
// Do stuff here!
}
}

View File

@@ -1,63 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<examples>
<!-- TODO add back in when there are enough samples to justify tags
<tagDescription>
<name>Simple Robot</name>
<description>Examples for simple robot programs.</description>
</tagDescription>
<tagDescription>
<name>CommandBased Robot</name>
<description>Examples for CommandBased robot programs.</description>
</tagDescription>
<tagDescription>
<name>Simulation</name>
<description>Examples that can be run in simulation.</description>
</tagDescription>
<tagDescription>
<name>Network Tables</name>
<description>Examples of how to use Network Tables to accomplish a
variety of tasks such as sending and receiving values to both
dashboards and co-processors.</description>
</tagDescription>
<example>
<name>Simple Robot Example</name>
<description>The simplest possible program that compiles. This
shows the structure of a simple program that does nothing at
all.</description>
<tags>
<tag>Simple Robot</tag>
</tags>
<packages>
<package>src/$package-dir</package>
</packages>
<files>
<file source="examples/Simple Robot Example/Robot.java" destination="src/$package-dir/Robot.java" />
</files>
</example>
<example>
<name>Network Table Counter</name>
<description>A simple program that increments a network table
variable once every second. This shows the structure of a simple
program that only uses network tables.</description>
<tags>
<tag>Simple Robot</tag>
<tag>Network Tables</tag>
</tags>
<packages>
<package>src/$package-dir</package>
</packages>
<files>
<file source="examples/Network Table Counter/Robot.java" destination="src/$package-dir/Robot.java" />
</files>
</example>
<tagDescription>
<name>Simulation</name>
<description>Examples that can be run in simulation.</description>
</tagDescription>-->
<tagDescription>
<name>CommandBased Robot</name>
<description>Examples for CommandBased robot programs.</description>
</tagDescription>
<example>
<name>GearsBot</name>
<description>A fully functional example CommandBased program for WPIs GearsBot robot. This code can run on your computer if it supports simulation.</description>
<tags>
<tag>CommandBased Robot</tag>
<tag>Simulation</tag>
</tags>
<packages>
<package>src/$package-dir</package>
@@ -90,8 +57,6 @@
<description>A fully functional example CommandBased program for FRC Team 190&#39;s 2014 robot. This code can run on your computer if it supports simulation.</description>
<tags>
<tag>CommandBased Robot</tag>
<tag>Simulation</tag>
<tag>2014 Season</tag>
</tags>
<packages>
<package>src/$package-dir</package>