Initial checkin of unified hierarchy of WPILib 2015

This commit is contained in:
Brad Miller
2013-12-15 18:30:16 -05:00
commit 3178911eef
1560 changed files with 410007 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
timestamp=${timestamp}
version=${version}

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

View File

@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.1222262887" name="Cross GCC" nonInternalBuilderId="cdt.managedbuild.builder.gnu.cross" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="cdt.managedbuild.option.gnu.cross.prefix.513278893" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-linux-gnueabi-" valueType="string"/>
<option id="cdt.managedbuild.option.gnu.cross.path.1104307" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="$toolchain/bin" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.801649698" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder autoBuildTarget="all" buildPath="${workspace_loc:/$project}/Debug" cleanBuildTarget="clean" errorParsers="" id="org.eclipse.cdt.build.core.internal.builder.2128327489" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cross.c.compiler.432788947" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.154663678" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.516596133" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1224398283" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.442358515" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.549514425" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.1682909384" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1597382905" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="$cpp-location/include"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.963785380" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1367166630" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1568604896" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<option id="gnu.cpp.link.option.paths.1928585110" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="$cpp-location/lib"/>
</option>
<option id="gnu.cpp.link.option.libs.1072058280" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" value="WPILib"/>
<listOptionValue builtIn="false" value="HAL"/>
<listOptionValue builtIn="false" value="FRC_NetworkCommunication"/>
<listOptionValue builtIn="false" value="RoboRIO_FRC_ChipObject"/>
<listOptionValue builtIn="false" value="FRC_FPGA_ChipObject"/>
<listOptionValue builtIn="false" value="NiFpga"/>
<listOptionValue builtIn="false" value="ni_emb"/>
<listOptionValue builtIn="false" value="nirio_emb_can"/>
<listOptionValue builtIn="false" value="NiFpgaLv"/>
<listOptionValue builtIn="false" value="NiRioSrv"/>
<listOptionValue builtIn="false" value="ni_rtlog"/>
<listOptionValue builtIn="false" value="NetworkTables"/>
<listOptionValue builtIn="false" value="dl"/>
<listOptionValue builtIn="false" value="pthread"/>
<listOptionValue builtIn="false" value="HAL"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1757265359" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1584536431" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.cross.assembler.184874228" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.1131856974" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1900042568" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.136041223" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
<option id="cdt.managedbuild.option.gnu.cross.prefix.2033173825" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-linux-gnueabi-" valueType="string"/>
<option id="cdt.managedbuild.option.gnu.cross.path.1246856819" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="$toolchain/bin" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.433467152" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/$project}/Release" id="cdt.managedbuild.builder.gnu.cross.716436070" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.2003820010" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1889430616" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.1571598299" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1532409549" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.901599840" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.366961467" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.95433592" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.863062221" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.970059366" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.476884336" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.749590312" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1104120173" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1966871489" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.304828125" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="$project.cdt.managedbuild.target.gnu.cross.exe.548740421" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.418253318;cdt.managedbuild.config.gnu.cross.exe.debug.418253318.;cdt.managedbuild.tool.gnu.cross.c.compiler.432788947;cdt.managedbuild.tool.gnu.c.compiler.input.1224398283">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;" command="arm-none-linux-gnueabi-gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1534660163;cdt.managedbuild.config.gnu.cross.exe.release.1534660163.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.901599840;cdt.managedbuild.tool.gnu.cpp.compiler.input.863062221">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;" command="arm-none-linux-gnueabi-g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.418253318;cdt.managedbuild.config.gnu.cross.exe.debug.418253318.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.442358515;cdt.managedbuild.tool.gnu.cpp.compiler.input.963785380">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;" command="arm-none-linux-gnueabi-g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1534660163;cdt.managedbuild.config.gnu.cross.exe.release.1534660163.;cdt.managedbuild.tool.gnu.cross.c.compiler.2003820010;cdt.managedbuild.tool.gnu.c.compiler.input.1532409549">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;" command="arm-none-linux-gnueabi-gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/$project"/>
</configuration>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/$project"/>
</configuration>
</storageModule>
</cproject>

View File

@@ -0,0 +1,21 @@
# Deployment information
username=admin
password=
deploy.dir=/home/admin
deploy.run.command=./runcppprogram
deploy.debug.command=./debugcppprogram
# Libraries to use
wpilib=${user.home}/wpilib/cpp/${cpp-version}
wpilib.lib=${wpilib}/lib
# Ant support
wpilib.ant.dir=${wpilib}/ant
jsch.jar=${wpilib.ant.dir}/jsch-0.1.50.jar
classloadertask.jar=${wpilib.ant.dir}/ant-classloadertask.jar
# Build information
out=FRCUserProgram
src.dir=src
build.dir=build
out.exe=Debug/${out}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="FRC Deployment" default="deploy">
<!--
The following properties can be defined to override system level
settings. These should not be touched unless you know what you're
doing. The primary use is to override the wpilib version when
working with older robots that can't compile with the latest
libraries.
-->
<!-- By default the system version of WPI is used -->
<!-- <property name="version" value=""/> -->
<!-- By default the system team number is used -->
<!-- <property name="team-number" value=""/> -->
<!-- By default the target is set to 10.TE.AM.2 -->
<!-- <property name="target" value=""/> -->
<property file="${user.home}/wpilib/wpilib.properties"/>
<property file="build.properties"/>
<import file="${wpilib.ant.dir}/build.xml"/>
</project>

View File

@@ -0,0 +1,31 @@
#include "$classname.h"
$classname::$classname() {
// Use Requires() here to declare subsystem dependencies
// eg. Requires(chassis);
}
// Called just before this Command runs the first time
void $classname::Initialize() {
}
// Called repeatedly when this Command is scheduled to run
void $classname::Execute() {
}
// Make this return true when this Command no longer needs to run execute()
bool $classname::IsFinished() {
return false;
}
// Called once after isFinished returns true
void $classname::End() {
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void $classname::Interrupted() {
}

View File

@@ -0,0 +1,21 @@
#ifndef $classname_H
#define $classname_H
#include "../CommandBase.h"
/**
*
*
* @author ExampleAuthor
*/
class $classname: public CommandBase {
public:
$classname();
virtual void Initialize();
virtual void Execute();
virtual bool IsFinished();
virtual void End();
virtual void Interrupted();
};
#endif

View File

@@ -0,0 +1,21 @@
#include "CommandBase.h"
#include "Subsystems/ExampleSubsystem.h"
#include "Commands/Scheduler.h"
CommandBase::CommandBase(const char *name) : Command(name) {
}
CommandBase::CommandBase() : Command() {
}
// Initialize a single static instance of all of your subsystems to NULL
ExampleSubsystem* CommandBase::examplesubsystem = NULL;
OI* CommandBase::oi = NULL;
void CommandBase::init() {
// Create a single static instance of all of your subsystems. The following
// line should be repeated for each subsystem in the project.
examplesubsystem = new ExampleSubsystem();
oi = new OI();
}

View File

@@ -0,0 +1,24 @@
#ifndef COMMAND_BASE_H
#define COMMAND_BASE_H
#include "Commands/Command.h"
#include "Subsystems/ExampleSubsystem.h"
#include "OI.h"
/**
* The base for all commands. All atomic commands should subclass CommandBase.
* CommandBase stores creates and stores each control system. To access a
* subsystem elsewhere in your code in your code use CommandBase.examplesubsystem
*/
class CommandBase: public Command {
public:
CommandBase(const char *name);
CommandBase();
static void init();
// Create a single static instance of all of your subsystems
static ExampleSubsystem *examplesubsystem;
static OI *oi;
};
#endif

View File

@@ -0,0 +1,21 @@
#include "$classname.h"
$classname::$classname() {
// Add Commands here:
// e.g. AddSequential(new Command1());
// AddSequential(new Command2());
// these will run in order.
// To run multiple commands at the same time,
// use AddParallel()
// e.g. AddParallel(new Command1());
// AddSequential(new Command2());
// Command1 and Command2 will run in parallel.
// A command group will require all of the subsystems that each member
// would require.
// e.g. if Command1 requires chassis, and Command2 requires arm,
// a CommandGroup containing them would require both the chassis and the
// arm.
}

View File

@@ -0,0 +1,17 @@
#ifndef $classname_H
#define $classname_H
#include "Commands/CommandGroup.h"
/**
*
*
* @author ExampleAuthor
*/
class $classname: public CommandGroup {
public:
$classname();
};
#endif

View File

@@ -0,0 +1,31 @@
#include "ExampleCommand.h"
ExampleCommand::ExampleCommand() {
// Use Requires() here to declare subsystem dependencies
// eg. Requires(chassis);
}
// Called just before this Command runs the first time
void ExampleCommand::Initialize() {
}
// Called repeatedly when this Command is scheduled to run
void ExampleCommand::Execute() {
}
// Make this return true when this Command no longer needs to run execute()
bool ExampleCommand::IsFinished() {
return false;
}
// Called once after isFinished returns true
void ExampleCommand::End() {
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void ExampleCommand::Interrupted() {
}

View File

@@ -0,0 +1,21 @@
#ifndef EXAMPLE_COMMAND_H
#define EXAMPLE_COMMAND_H
#include "../CommandBase.h"
/**
*
*
* @author ExampleAuthor
*/
class ExampleCommand: public CommandBase {
public:
ExampleCommand();
virtual void Initialize();
virtual void Execute();
virtual bool IsFinished();
virtual void End();
virtual void Interrupted();
};
#endif

View File

@@ -0,0 +1,16 @@
#include "ExampleSubsystem.h"
#include "../Robotmap.h"
ExampleSubsystem::ExampleSubsystem() : Subsystem("ExampleSubsystem") {
}
void ExampleSubsystem::InitDefaultCommand() {
// Set the default command for a subsystem here.
//SetDefaultCommand(new MySpecialCommand());
}
// Put methods for controlling this subsystem
// here. Call these from Commands.

View File

@@ -0,0 +1,20 @@
#ifndef EXAMPLE_SUBSYSTEM_H
#define EXAMPLE_SUBSYSTEM_H
#include "Commands/Subsystem.h"
#include "WPILib.h"
/**
*
*
* @author ExampleAuthor
*/
class ExampleSubsystem: public Subsystem {
private:
// It's desirable that everything possible under private except
// for methods that implement subsystem capabilities
public:
ExampleSubsystem();
void InitDefaultCommand();
};
#endif

View File

@@ -0,0 +1,5 @@
#include "OI.h"
OI::OI() {
// Process operator interface input here.
}

View File

@@ -0,0 +1,13 @@
#ifndef OI_H
#define OI_H
#include "WPILib.h"
class OI {
private:
public:
OI();
};
#endif

View File

@@ -0,0 +1,31 @@
#include "$classname.h"
#include "../Robotmap.h"
#include "SmartDashboard/SmartDashboard.h"
#include "LiveWindow/LiveWindow.h"
#@autogenerated_code("pid", "")
#parse("${exporter-path}PIDSubsystem-pid.cpp")
#end
$classname::$classname() : PIDSubsystem("$classname", 1.0, 0.0, 0.0) {
// Use these to get going:
// SetSetpoint() - Sets where the PID controller should move the system
// to
// Enable() - Enables the PID controller.
}
double $classname::ReturnPIDInput() {
// Return your input value for the PID loop
// e.g. a sensor, like a potentiometer:
// yourPot->SetAverageVoltage() / kYourMaxVoltage;
}
void $classname::UsePIDOutput(double output) {
// Use output to drive your system, like a motor
// e.g. yourMotor->Set(output);
}
void $classname::InitDefaultCommand() {
// Set the default command for a subsystem here.
//setDefaultCommand(new MySpecialCommand());
}

View File

@@ -0,0 +1,21 @@
#ifndef $classname_H
#define $classname_H
#include "Commands/PIDSubsystem.h"
#include "WPILib.h"
/**
*
*
* @author ExampleAuthor
*/
class $classname: public PIDSubsystem {
public:
$classname();
double ReturnPIDInput();
void UsePIDOutput(double output);
void InitDefaultCommand();
};
#endif

View File

@@ -0,0 +1,51 @@
//============================================================================
// Name : Robot.cpp
// Author :
// Version :
// Copyright :
// Description : Hello World in C++, Ansi-style
//============================================================================
#include "WPILib.h"
#include "Commands/Command.h"
#include "Commands/ExampleCommand.h"
#include "CommandBase.h"
class Robot : public IterativeRobot {
private:
Command *autonomousCommand;
LiveWindow *lw;
virtual void RobotInit() {
CommandBase::init();
autonomousCommand = new ExampleCommand();
lw = LiveWindow::GetInstance();
}
virtual void AutonomousInit() {
autonomousCommand->Start();
}
virtual void AutonomousPeriodic() {
Scheduler::GetInstance()->Run();
}
virtual void TeleopInit() {
// This makes sure that the autonomous stops running when
// teleop starts running. If you want the autonomous to
// continue until interrupted by another command, remove
// this line or comment it out.
autonomousCommand->Cancel();
}
virtual void TeleopPeriodic() {
Scheduler::GetInstance()->Run();
}
virtual void TestPeriodic() {
lw->Run();
}
};
START_ROBOT_CLASS(Robot);

View File

@@ -0,0 +1,22 @@
#ifndef ROBOTMAP_H
#define ROBOTMAP_H
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
// For example to map the left and right motors, you could define the
// following variables to use with your drivetrain subsystem.
// #define LEFTMOTOR 1
// #define RIGHTMOTOR 2
// If you are using multiple modules, make sure to define both the port
// number and the module. For example you with a rangefinder:
// #define RANGE_FINDER_PORT 1
// #define RANGE_FINDER_MODULE 1
#endif

View File

@@ -0,0 +1,15 @@
#include "$classname.h"
#include "../Robotmap.h"
$classname::$classname() : Subsystem("ExampleSubsystem") {
}
void $classname::InitDefaultCommand() {
// Set the default command for a subsystem here.
//SetDefaultCommand(new MySpecialCommand());
}
// Put methods for controlling this subsystem
// here. Call these from Commands.

View File

@@ -0,0 +1,20 @@
#ifndef $classname_H
#define $classname_H
#include "Commands/Subsystem.h"
#include "WPILib.h"
/**
*
*
* @author ExampleAuthor
*/
class $classname: public Subsystem {
private:
// It's desirable that everything possible under private except
// for methods that implement subsystem capabilities
public:
$classname();
void InitDefaultCommand();
};
#endif

View File

@@ -0,0 +1,13 @@
// TODO: convert into C++ template
import edu.wpi.first.wpilibj.command.Trigger;
/**
* New and improved C++
*/
public class $classname extends Trigger {
public boolean get() {
return false;
}
}

View File

@@ -0,0 +1,13 @@
// TODO: convert into C++ template
import edu.wpi.first.wpilibj.command.Trigger;
/**
* New and improved C++
*/
public class $classname extends Trigger {
public boolean get() {
return false;
}
}

View File

@@ -0,0 +1,30 @@
//============================================================================
// Name : Robot.cpp
// Author :
// Version :
// Copyright :
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <networktables/NetworkTable.h>
#include <iostream>
using namespace std;
// This is a simple robot program
int main() {
NetworkTable::SetServerMode();
NetworkTable::SetTeam(190);
NetworkTable* table = NetworkTable::GetTable("SmartDashboard");
cout << "Started up" << endl;
long i = 0;
while (true) {
cout << i << endl;
table->PutNumber("i", i);
i++;
sleep(1);
}
return 0;
}

View File

@@ -0,0 +1,17 @@
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

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<examples>
<tagDescription>
<name>Simple Robot</name>
<description>Examples for simple robot programs.</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>
</packages>
<files>
<file source="examples/Simple Robot Example/Robot.java" destination="src/Robot.cpp" />
</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>
</packages>
<files>
<file source="examples/Network Table Counter/Robot.cpp" destination="src/Robot.cpp" />
</files>
</example>
</examples>

View File

@@ -0,0 +1,48 @@
//============================================================================
// Name : Robot.cpp
// Author :
// Version :
// Copyright :
// Description : Hello World in C++, Ansi-style
//============================================================================
//============================================================================
// Name : Robot.cpp
// Author :
// Version :
// Copyright :
// Description : Hello World in C++, Ansi-style
//============================================================================
#include "WPILib.h"
class Robot : public IterativeRobot {
private:
LiveWindow *lw;
virtual void RobotInit() {
lw = LiveWindow::GetInstance();
}
virtual void AutonomousInit() {
}
virtual void AutonomousPeriodic() {
}
virtual void TeleopInit() {
}
virtual void TeleopPeriodic() {
}
virtual void TestPeriodic() {
lw->Run();
}
};
START_ROBOT_CLASS(Robot);

View File

@@ -0,0 +1,62 @@
//============================================================================
// Name : Robot.cpp
// Author :
// Version :
// Copyright :
// Description : Hello World in C++, Ansi-style
//============================================================================
#include "WPILib.h"
/**
* This is a demo program showing the use of the RobotBase class.
* The SimpleRobot class is the base of a robot application that will automatically call your
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
* the driver station or the field controls.
*/
class Robot : public SimpleRobot
{
RobotDrive myRobot; // robot drive system
Joystick stick; // only joystick
public:
Robot(void):
myRobot(1, 2), // these must be initialized in the same order
stick(1) // as they are declared above.
{
myRobot.SetExpiration(0.1);
}
/**
* Drive left & right motors for 2 seconds then stop
*/
void Autonomous(void)
{
myRobot.SetSafetyEnabled(false);
myRobot.Drive(-0.5, 0.0); // drive forwards half speed
Wait(2.0); // for 2 seconds
myRobot.Drive(0.0, 0.0); // stop robot
}
/**
* Runs the motors with arcade steering.
*/
void OperatorControl(void)
{
myRobot.SetSafetyEnabled(true);
while (IsOperatorControl())
{
myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
Wait(0.005); // wait for a motor update time
}
}
/**
* Runs during test mode
*/
void Test() {
}
};
START_ROBOT_CLASS(Robot);