mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
New 2018 and later build setup (#1001)
This commit is contained in:
committed by
Peter Johnson
parent
cb2c9eb6d5
commit
7f88cf768d
@@ -1,76 +1,76 @@
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -8
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping: {AfterClass: false, AfterControlStatement: false, AfterEnum: false,
|
||||
AfterFunction: true, AfterNamespace: false, AfterObjCDeclaration: false, AfterStruct: false,
|
||||
AfterUnion: false, BeforeCatch: false, BeforeElse: false, IndentBraces: false}
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 16
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: true
|
||||
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
|
||||
IncludeCategories:
|
||||
- {Priority: 2, Regex: ^"(llvm|llvm-c|clang|clang-c)/}
|
||||
- {Priority: 3, Regex: ^(<|"(gtest|isl|json)/)}
|
||||
- {Priority: 1, Regex: .*}
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 8
|
||||
IndentWrappedFunctionNames: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
ObjCBlockIndentWidth: 0
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 345
|
||||
PenaltyBreakFirstLessLess: 150
|
||||
PenaltyBreakString: 618
|
||||
PenaltyExcessCharacter: 977572
|
||||
PenaltyReturnTypeOnItsOwnLine: 41
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: true
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp03
|
||||
TabWidth: 8
|
||||
UseTab: Always
|
||||
...
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -8
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping: {AfterClass: false, AfterControlStatement: false, AfterEnum: false,
|
||||
AfterFunction: true, AfterNamespace: false, AfterObjCDeclaration: false, AfterStruct: false,
|
||||
AfterUnion: false, BeforeCatch: false, BeforeElse: false, IndentBraces: false}
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 16
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: true
|
||||
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
|
||||
IncludeCategories:
|
||||
- {Priority: 2, Regex: ^"(llvm|llvm-c|clang|clang-c)/}
|
||||
- {Priority: 3, Regex: ^(<|"(gtest|isl|json)/)}
|
||||
- {Priority: 1, Regex: .*}
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 8
|
||||
IndentWrappedFunctionNames: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
ObjCBlockIndentWidth: 0
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 345
|
||||
PenaltyBreakFirstLessLess: 150
|
||||
PenaltyBreakString: 618
|
||||
PenaltyExcessCharacter: 977572
|
||||
PenaltyReturnTypeOnItsOwnLine: 41
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: true
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp03
|
||||
TabWidth: 8
|
||||
UseTab: Always
|
||||
...
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
cppHeaderFileInclude {
|
||||
\.h$
|
||||
\.hpp$
|
||||
\.inc$
|
||||
}
|
||||
|
||||
cppSrcFileInclude {
|
||||
\.cpp$
|
||||
}
|
||||
|
||||
generatedFileExclude {
|
||||
gmock/
|
||||
ni-libraries/include/
|
||||
ni-libraries/lib/
|
||||
hal/src/main/native/athena/ctre/
|
||||
hal/src/main/native/athena/frccansae/
|
||||
hal/src/main/native/athena/visa/
|
||||
hal/src/main/native/include/ctre/
|
||||
UsageReporting\.h$
|
||||
}
|
||||
|
||||
modifiableFileExclude {
|
||||
wpilibj/src/arm-linux-jni/
|
||||
wpilibj/src/main/native/cpp/
|
||||
\.patch$
|
||||
\.png$
|
||||
\.py$
|
||||
\.so$
|
||||
}
|
||||
|
||||
includeGuardRoots {
|
||||
wpilibcExamples/src/main/cpp/examples/
|
||||
wpilibcExamples/src/main/cpp/templates/
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^HAL/
|
||||
^llvm/
|
||||
^opencv2/
|
||||
^support/
|
||||
}
|
||||
|
||||
includeProject {
|
||||
^ctre/
|
||||
}
|
||||
cppHeaderFileInclude {
|
||||
\.h$
|
||||
\.hpp$
|
||||
\.inc$
|
||||
}
|
||||
|
||||
cppSrcFileInclude {
|
||||
\.cpp$
|
||||
}
|
||||
|
||||
generatedFileExclude {
|
||||
gmock/
|
||||
ni-libraries/include/
|
||||
ni-libraries/lib/
|
||||
hal/src/main/native/athena/ctre/
|
||||
hal/src/main/native/athena/frccansae/
|
||||
hal/src/main/native/athena/visa/
|
||||
hal/src/main/native/include/ctre/
|
||||
UsageReporting\.h$
|
||||
}
|
||||
|
||||
modifiableFileExclude {
|
||||
wpilibj/src/arm-linux-jni/
|
||||
wpilibj/src/main/native/cpp/
|
||||
\.patch$
|
||||
\.png$
|
||||
\.py$
|
||||
\.so$
|
||||
}
|
||||
|
||||
includeGuardRoots {
|
||||
wpilibcExamples/src/main/cpp/examples/
|
||||
wpilibcExamples/src/main/cpp/templates/
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^HAL/
|
||||
^llvm/
|
||||
^opencv2/
|
||||
^support/
|
||||
}
|
||||
|
||||
includeProject {
|
||||
^ctre/
|
||||
}
|
||||
|
||||
@@ -1,114 +1,157 @@
|
||||
import org.gradle.language.base.internal.ProjectLayout
|
||||
|
||||
if (!project.hasProperty('skipAthena')) {
|
||||
apply plugin: 'cpp'
|
||||
apply plugin: 'visual-studio'
|
||||
apply plugin: 'edu.wpi.first.NativeUtils'
|
||||
apply plugin: 'cpp'
|
||||
apply plugin: 'visual-studio'
|
||||
apply plugin: 'edu.wpi.first.NativeUtils'
|
||||
|
||||
apply from: '../config.gradle'
|
||||
apply from: '../shared/config.gradle'
|
||||
|
||||
ext.examplesMap = [:]
|
||||
ext.templatesMap = [:]
|
||||
ext.examplesMap = [:]
|
||||
ext.templatesMap = [:]
|
||||
|
||||
File examplesTree = file("$projectDir/src/main/cpp/examples")
|
||||
examplesTree.list(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File current, String name) {
|
||||
File examplesTree = file("$projectDir/src/main/cpp/examples")
|
||||
examplesTree.list(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File current, String name) {
|
||||
return new File(current, name).isDirectory();
|
||||
}
|
||||
}).each {
|
||||
examplesMap.put(it, [])
|
||||
}
|
||||
File templatesTree = file("$projectDir/src/main/cpp/templates")
|
||||
templatesTree.list(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File current, String name) {
|
||||
return new File(current, name).isDirectory();
|
||||
}
|
||||
}).each {
|
||||
templatesMap.put(it, [])
|
||||
}
|
||||
|
||||
model {
|
||||
dependencyConfigs {
|
||||
wpiutil(DependencyConfig) {
|
||||
groupId = 'edu.wpi.first.wpiutil'
|
||||
artifactId = 'wpiutil-cpp'
|
||||
headerClassifier = 'headers'
|
||||
ext = 'zip'
|
||||
version = '3.+'
|
||||
sharedConfigs = examplesMap + templatesMap
|
||||
}
|
||||
ntcore(DependencyConfig) {
|
||||
groupId = 'edu.wpi.first.ntcore'
|
||||
artifactId = 'ntcore-cpp'
|
||||
headerClassifier = 'headers'
|
||||
ext = 'zip'
|
||||
version = '4.+'
|
||||
sharedConfigs = examplesMap + templatesMap
|
||||
}
|
||||
opencv(DependencyConfig) {
|
||||
groupId = 'org.opencv'
|
||||
artifactId = 'opencv-cpp'
|
||||
headerClassifier = 'headers'
|
||||
ext = 'zip'
|
||||
version = '3.2.0'
|
||||
sharedConfigs = examplesMap + templatesMap
|
||||
}
|
||||
cscore(DependencyConfig) {
|
||||
groupId = 'edu.wpi.first.cscore'
|
||||
artifactId = 'cscore-cpp'
|
||||
headerClassifier = 'headers'
|
||||
ext = 'zip'
|
||||
version = '1.+'
|
||||
sharedConfigs = examplesMap + templatesMap
|
||||
}
|
||||
}
|
||||
|
||||
components {
|
||||
examplesMap.each { key, value->
|
||||
"${key}"(NativeExecutableSpec) {
|
||||
binaries.all { binary->
|
||||
if (binary.targetPlatform.architecture.name == 'athena') {
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
project(':hal').addHalToLinker(binary)
|
||||
project(':wpilibc').addWpilibCToLinker(binary)
|
||||
} else {
|
||||
binary.buildable = false
|
||||
}
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDirs 'src/main/cpp/examples/' + "${key}"
|
||||
include '**/*.cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
templatesMap.each { key, value->
|
||||
"${key}"(NativeExecutableSpec) {
|
||||
binaries.all { binary->
|
||||
if (binary.targetPlatform.architecture.name == 'athena') {
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
project(':hal').addHalToLinker(binary)
|
||||
project(':wpilibc').addWpilibCToLinker(binary)
|
||||
} else {
|
||||
binary.buildable = false
|
||||
}
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDirs 'src/main/cpp/templates/' + "${key}"
|
||||
include '**/*.cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
apply from: 'publish.gradle'
|
||||
}).each {
|
||||
examplesMap.put(it, [])
|
||||
}
|
||||
File templatesTree = file("$projectDir/src/main/cpp/templates")
|
||||
templatesTree.list(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File current, String name) {
|
||||
return new File(current, name).isDirectory();
|
||||
}
|
||||
}).each {
|
||||
templatesMap.put(it, [])
|
||||
}
|
||||
|
||||
ext {
|
||||
sharedCvConfigs = examplesMap + templatesMap
|
||||
staticCvConfigs = [:]
|
||||
useJava = false
|
||||
useCpp = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/opencv.gradle"
|
||||
|
||||
model {
|
||||
components {
|
||||
examplesMap.each { key, value ->
|
||||
"${key}"(NativeExecutableSpec) {
|
||||
binaries.all { binary ->
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
if (binary.targetPlatform.architecture.name != 'athena') {
|
||||
lib project: ':simulation:halsim_lowfi', library: 'halsim_lowfi', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_print', library: 'halsim_print', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_ds_nt', library: 'halsim_ds_nt', linkage: 'shared'
|
||||
}
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDirs 'src/main/cpp/examples/' + "${key}"
|
||||
include '**/*.cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
templatesMap.each { key, value ->
|
||||
"${key}"(NativeExecutableSpec) {
|
||||
binaries.all { binary ->
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
binary.tasks.withType(CppCompile) {
|
||||
if (!(binary.toolChain in VisualCpp)) {
|
||||
cppCompiler.args "-Wno-error=deprecated-declarations"
|
||||
}
|
||||
}
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
if (binary.targetPlatform.architecture.name != 'athena') {
|
||||
lib project: ':simulation:halsim_lowfi', library: 'halsim_lowfi', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_print', library: 'halsim_print', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_ds_nt', library: 'halsim_ds_nt', linkage: 'shared'
|
||||
}
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDirs 'src/main/cpp/templates/' + "${key}"
|
||||
include '**/*.cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks {
|
||||
def b = $.binaries
|
||||
b.each { binary->
|
||||
if (binary in NativeExecutableBinarySpec) {
|
||||
def installDir = binary.tasks.install.installDirectory.get().toString() + File.separatorChar
|
||||
def runFile = binary.tasks.install.runScriptFile.get().asFile.toString()
|
||||
|
||||
binary.tasks.install.doLast {
|
||||
if (binary.targetPlatform.operatingSystem.isWindows()) {
|
||||
// Windows batch scripts
|
||||
def fileName = binary.component.name + 'LowFi.bat'
|
||||
def file = new File(installDir + fileName)
|
||||
file.withWriter { out ->
|
||||
out.println '@ECHO OFF'
|
||||
out.print 'SET HALSIM_EXTENSIONS='
|
||||
out.print '"' + new File(installDir + 'lib\\halsim_lowfi.dll').toString() + '";'
|
||||
out.println '"' + new File(installDir + 'lib\\halsim_ds_nt.dll').toString() + '"'
|
||||
out.println runFile + ' %*'
|
||||
}
|
||||
|
||||
fileName = binary.component.name + 'LowFiRealDS.bat'
|
||||
file = new File(installDir + fileName)
|
||||
file.withWriter { out ->
|
||||
out.println '@ECHO OFF'
|
||||
out.print 'SET HALSIM_EXTENSIONS='
|
||||
out.print '"' + new File(installDir + 'lib\\halsim_lowfi.dll').toString() + '";'
|
||||
out.println '"' + new File(installDir + 'lib\\halsim_ds_socket.dll').toString() + '"'
|
||||
out.println runFile + ' %*'
|
||||
}
|
||||
} else {
|
||||
def fileName = binary.component.name + 'LowFi.sh'
|
||||
def file = new File(installDir + fileName)
|
||||
|
||||
file.withWriter { out ->
|
||||
out.print 'export HALSIM_EXTENSIONS='
|
||||
out.print '"' + new File(installDir + '/lib/libhalsim_lowfi.so').toString() + '";'
|
||||
out.println '"' + new File(installDir + '/lib/libhalsim_ds_nt.so').toString() + '"'
|
||||
out.println runFile + ' "$@"'
|
||||
}
|
||||
|
||||
fileName = binary.component.name + 'LowFiRealDS.sh'
|
||||
file = new File(installDir + fileName)
|
||||
file.withWriter { out ->
|
||||
out.print 'export HALSIM_EXTENSIONS='
|
||||
out.print '"' + new File(installDir + '/lib/libhalsim_lowfi.so').toString() + '":'
|
||||
out.println '"' + new File(installDir + '/lib/libhalsim_ds_socket.so').toString() + '"'
|
||||
out.println runFile + ' "$@"'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
apply from: 'publish.gradle'
|
||||
|
||||
@@ -1,482 +1,482 @@
|
||||
<?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>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>
|
||||
<tagDescription>
|
||||
<name>Simulation</name>
|
||||
<description>Examples that can be run in simulation.</description>
|
||||
</tagDescription>-->
|
||||
<tagDescription>
|
||||
<name>Getting Started with C++</name>
|
||||
<description>Examples for getting started with FRC C++</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Actuators</name>
|
||||
<description>Example programs that demonstrate the use of various actuators</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Analog</name>
|
||||
<description>Examples programs that show different uses of analog inputs,
|
||||
outputs and various analog sensors</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>CAN</name>
|
||||
<description>Example programs that demonstrate the use of the CAN components in the control
|
||||
system</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Complete List</name>
|
||||
<description>Complete list of all sample programs across all categories</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Digital</name>
|
||||
<description>Example programs that demonstrate the sensors that use the digital I/O ports</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>I2C</name>
|
||||
<description>Example programs that demonstrate the use of I2C and various sensors that use
|
||||
it</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Joystick</name>
|
||||
<description>Example programs that demonstate different uses of joysticks for robot
|
||||
driving</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Pneumatics</name>
|
||||
<description>Example programs that demonstrate the use of the compressor and solenoids</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Robot and Motor</name>
|
||||
<description>Example programs that demonstrate driving a robot and motors including safety,
|
||||
servos, etc.</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>SPI</name>
|
||||
<description>Example programs that demonstrate the use of the SPI bus and sensors that
|
||||
connect to it</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Safety</name>
|
||||
<description>Example programs that demonstate the motor safety classes and how to use them
|
||||
with your programs</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Sensors</name>
|
||||
<description>Example programs that demonstrate the use of the various commonly used sensors
|
||||
on FRC robots</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Vision</name>
|
||||
<description>Example programs that demonstrate the use of a camera for image acquisition and
|
||||
processing</description>
|
||||
</tagDescription>
|
||||
<example>
|
||||
<name>Motor Controller</name>
|
||||
<description>Demonstrate controlling a single motor with a Joystick.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MotorControl/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Motor Control With Encoder</name>
|
||||
<description>Demonstrate controlling a single motor with a Joystick and displaying the net
|
||||
movement of the motor using an encoder.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Digital</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MotorControl/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Relay</name>
|
||||
<description>Demonstrate controlling a Relay from Joystick buttons.</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Relay/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>PDP CAN Monitoring</name>
|
||||
<description>Demonstrate using CAN to monitor the voltage, current, and temperature in the
|
||||
Power Distribution Panel.</description>
|
||||
<tags>
|
||||
<tag>Complete List</tag>
|
||||
<tag>CAN</tag>
|
||||
<tag>Sensors</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/CANPDP/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Solenoids</name>
|
||||
<description>Demonstrate controlling a single and double solenoid from Joystick buttons.</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Pneumatics</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Solenoid/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Encoder</name>
|
||||
<description>Demonstrate displaying the value of a quadrature encoder on the
|
||||
SmartDashboard.</description>
|
||||
<tags>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Digital</tag>
|
||||
<tag>Sensors</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Encoder/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Arcade Drive</name>
|
||||
<description>An example program which demonstrates the use of Arcade Drive with the DifferentialDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/ArcadeDrive/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Mecanum Drive</name>
|
||||
<description>An example program which demonstrates the use of Mecanum Drive with the MecanumDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MecanumDrive/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Ultrasonic</name>
|
||||
<description>Demonstrate maintaining a set distance using an ultrasonic sensor.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Ultrasonic/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>UltrasonicPID</name>
|
||||
<description>Demonstrate maintaining a set distance using an ultrasonic sensor and PID
|
||||
control.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/UltrasonicPID/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Gyro</name>
|
||||
<description>An example program showing how to drive straight with using a gyro sensor.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
<tag>Joystick</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Gyro/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Gyro Mecanum</name>
|
||||
<description>An example program showing how to perform mecanum drive with field oriented
|
||||
controls.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
<tag>Joysitck</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GyroMecanum/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>PotentiometerPID</name>
|
||||
<description>An example to demonstrate the use of a potentiometer and PID control to reach
|
||||
elevator position setpoints.</description>
|
||||
<tags>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/PotentiometerPID/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Simple Vision</name>
|
||||
<description>The minimal program to acquire images from an attached USB camera on the robot
|
||||
and send them to the dashboard.</description>
|
||||
<tags>
|
||||
<tag>Vision</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/QuickVision/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Intermediate Vision</name>
|
||||
<description>An example program that acquires images from an attached USB camera and adds
|
||||
some
|
||||
annotation to the image as you might do for showing operators the result of some image
|
||||
recognition, and sends it to the dashboard for display.</description>
|
||||
<tags>
|
||||
<tag>Vision</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/IntermediateVision/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Axis Camera Sample</name>
|
||||
<description>An example program that acquires images from an Axis network camera and adds
|
||||
some
|
||||
annotation to the image as you might do for showing operators the result of some image
|
||||
recognition, and sends it to the dashboard for display. This demonstrates the use of the
|
||||
AxisCamera class.</description>
|
||||
<tags>
|
||||
<tag>Vision</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/AxisCameraSample/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<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>Complete List</tag>
|
||||
</tags>
|
||||
<world>/usr/share/frcsim/worlds/GearsBotDemo.world</world>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
<package>src/Commands</package>
|
||||
<package>src/Subsystems</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GearsBot/src/Commands/Autonomous.cpp" destination="src/Commands/Autonomous.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/Autonomous.h" destination="src/Commands/Autonomous.h" />
|
||||
<file source="examples/GearsBot/src/Commands/CloseClaw.cpp" destination="src/Commands/CloseClaw.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/CloseClaw.h" destination="src/Commands/CloseClaw.h" />
|
||||
<file source="examples/GearsBot/src/Commands/DriveStraight.cpp" destination="src/Commands/DriveStraight.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/DriveStraight.h" destination="src/Commands/DriveStraight.h" />
|
||||
<file source="examples/GearsBot/src/Commands/OpenClaw.cpp" destination="src/Commands/OpenClaw.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/OpenClaw.h" destination="src/Commands/OpenClaw.h" />
|
||||
<file source="examples/GearsBot/src/Commands/Pickup.cpp" destination="src/Commands/Pickup.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/Pickup.h" destination="src/Commands/Pickup.h" />
|
||||
<file source="examples/GearsBot/src/Commands/Place.cpp" destination="src/Commands/Place.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/Place.h" destination="src/Commands/Place.h" />
|
||||
<file source="examples/GearsBot/src/Commands/PrepareToPickup.cpp" destination="src/Commands/PrepareToPickup.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/PrepareToPickup.h" destination="src/Commands/PrepareToPickup.h" />
|
||||
<file source="examples/GearsBot/src/Commands/SetDistanceToBox.cpp" destination="src/Commands/SetDistanceToBox.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/SetDistanceToBox.h" destination="src/Commands/SetDistanceToBox.h" />
|
||||
<file source="examples/GearsBot/src/Commands/SetElevatorSetpoint.cpp" destination="src/Commands/SetElevatorSetpoint.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/SetElevatorSetpoint.h" destination="src/Commands/SetElevatorSetpoint.h" />
|
||||
<file source="examples/GearsBot/src/Commands/SetWristSetpoint.cpp" destination="src/Commands/SetWristSetpoint.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/SetWristSetpoint.h" destination="src/Commands/SetWristSetpoint.h" />
|
||||
<file source="examples/GearsBot/src/Commands/TankDriveWithJoystick.cpp" destination="src/Commands/TankDriveWithJoystick.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/TankDriveWithJoystick.h" destination="src/Commands/TankDriveWithJoystick.h" />
|
||||
<file source="examples/GearsBot/src/OI.cpp" destination="src/OI.cpp" />
|
||||
<file source="examples/GearsBot/src/OI.h" destination="src/OI.h" />
|
||||
<file source="examples/GearsBot/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
<file source="examples/GearsBot/src/Robot.h" destination="src/Robot.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Claw.cpp" destination="src/Subsystems/Claw.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Claw.h" destination="src/Subsystems/Claw.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/DriveTrain.cpp" destination="src/Subsystems/DriveTrain.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/DriveTrain.h" destination="src/Subsystems/DriveTrain.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Elevator.cpp" destination="src/Subsystems/Elevator.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Elevator.h" destination="src/Subsystems/Elevator.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Wrist.cpp" destination="src/Subsystems/Wrist.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Wrist.h" destination="src/Subsystems/Wrist.h" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>PacGoat</name>
|
||||
<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>Complete List</tag>
|
||||
</tags>
|
||||
<world>/usr/share/frcsim/worlds/PacGoat2014.world</world>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
<package>src/Commands</package>
|
||||
<package>src/Subsystems</package>
|
||||
<package>src/Triggers</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/PacGoat/src/Commands/CheckForHotGoal.cpp" destination="src/Commands/CheckForHotGoal.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/CheckForHotGoal.h" destination="src/Commands/CheckForHotGoal.h" />
|
||||
<file source="examples/PacGoat/src/Commands/CloseClaw.cpp" destination="src/Commands/CloseClaw.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/CloseClaw.h" destination="src/Commands/CloseClaw.h" />
|
||||
<file source="examples/PacGoat/src/Commands/Collect.cpp" destination="src/Commands/Collect.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/Collect.h" destination="src/Commands/Collect.h" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveAndShootAutonomous.cpp" destination="src/Commands/DriveAndShootAutonomous.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveAndShootAutonomous.h" destination="src/Commands/DriveAndShootAutonomous.h" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveForward.cpp" destination="src/Commands/DriveForward.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveForward.h" destination="src/Commands/DriveForward.h" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveWithJoystick.cpp" destination="src/Commands/DriveWithJoystick.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveWithJoystick.h" destination="src/Commands/DriveWithJoystick.h" />
|
||||
<file source="examples/PacGoat/src/Commands/ExtendShooter.cpp" destination="src/Commands/ExtendShooter.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/ExtendShooter.h" destination="src/Commands/ExtendShooter.h" />
|
||||
<file source="examples/PacGoat/src/Commands/LowGoal.cpp" destination="src/Commands/LowGoal.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/LowGoal.h" destination="src/Commands/LowGoal.h" />
|
||||
<file source="examples/PacGoat/src/Commands/OpenClaw.cpp" destination="src/Commands/OpenClaw.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/OpenClaw.h" destination="src/Commands/OpenClaw.h" />
|
||||
<file source="examples/PacGoat/src/Commands/SetCollectionSpeed.cpp" destination="src/Commands/SetCollectionSpeed.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/SetCollectionSpeed.h" destination="src/Commands/SetCollectionSpeed.h" />
|
||||
<file source="examples/PacGoat/src/Commands/SetPivotSetpoint.cpp" destination="src/Commands/SetPivotSetpoint.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/SetPivotSetpoint.h" destination="src/Commands/SetPivotSetpoint.h" />
|
||||
<file source="examples/PacGoat/src/Commands/Shoot.cpp" destination="src/Commands/Shoot.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/Shoot.h" destination="src/Commands/Shoot.h" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForBall.cpp" destination="src/Commands/WaitForBall.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForBall.h" destination="src/Commands/WaitForBall.h" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForPressure.cpp" destination="src/Commands/WaitForPressure.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForPressure.h" destination="src/Commands/WaitForPressure.h" />
|
||||
<file source="examples/PacGoat/src/OI.cpp" destination="src/OI.cpp" />
|
||||
<file source="examples/PacGoat/src/OI.h" destination="src/OI.h" />
|
||||
<file source="examples/PacGoat/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
<file source="examples/PacGoat/src/Robot.h" destination="src/Robot.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Collector.cpp" destination="src/Subsystems/Collector.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Collector.h" destination="src/Subsystems/Collector.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/DriveTrain.cpp" destination="src/Subsystems/DriveTrain.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/DriveTrain.h" destination="src/Subsystems/DriveTrain.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pivot.cpp" destination="src/Subsystems/Pivot.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pivot.h" destination="src/Subsystems/Pivot.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pneumatics.cpp" destination="src/Subsystems/Pneumatics.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pneumatics.h" destination="src/Subsystems/Pneumatics.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Shooter.cpp" destination="src/Subsystems/Shooter.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Shooter.h" destination="src/Subsystems/Shooter.h" />
|
||||
<file source="examples/PacGoat/src/Triggers/DoubleButton.cpp" destination="src/Triggers/DoubleButton.cpp" />
|
||||
<file source="examples/PacGoat/src/Triggers/DoubleButton.h" destination="src/Triggers/DoubleButton.h" />
|
||||
</files>
|
||||
</example>
|
||||
</examples>
|
||||
<?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>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>
|
||||
<tagDescription>
|
||||
<name>Simulation</name>
|
||||
<description>Examples that can be run in simulation.</description>
|
||||
</tagDescription>-->
|
||||
<tagDescription>
|
||||
<name>Getting Started with C++</name>
|
||||
<description>Examples for getting started with FRC C++</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Actuators</name>
|
||||
<description>Example programs that demonstrate the use of various actuators</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Analog</name>
|
||||
<description>Examples programs that show different uses of analog inputs,
|
||||
outputs and various analog sensors</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>CAN</name>
|
||||
<description>Example programs that demonstrate the use of the CAN components in the control
|
||||
system</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Complete List</name>
|
||||
<description>Complete list of all sample programs across all categories</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Digital</name>
|
||||
<description>Example programs that demonstrate the sensors that use the digital I/O ports</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>I2C</name>
|
||||
<description>Example programs that demonstrate the use of I2C and various sensors that use
|
||||
it</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Joystick</name>
|
||||
<description>Example programs that demonstate different uses of joysticks for robot
|
||||
driving</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Pneumatics</name>
|
||||
<description>Example programs that demonstrate the use of the compressor and solenoids</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Robot and Motor</name>
|
||||
<description>Example programs that demonstrate driving a robot and motors including safety,
|
||||
servos, etc.</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>SPI</name>
|
||||
<description>Example programs that demonstrate the use of the SPI bus and sensors that
|
||||
connect to it</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Safety</name>
|
||||
<description>Example programs that demonstate the motor safety classes and how to use them
|
||||
with your programs</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Sensors</name>
|
||||
<description>Example programs that demonstrate the use of the various commonly used sensors
|
||||
on FRC robots</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Vision</name>
|
||||
<description>Example programs that demonstrate the use of a camera for image acquisition and
|
||||
processing</description>
|
||||
</tagDescription>
|
||||
<example>
|
||||
<name>Motor Controller</name>
|
||||
<description>Demonstrate controlling a single motor with a Joystick.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MotorControl/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Motor Control With Encoder</name>
|
||||
<description>Demonstrate controlling a single motor with a Joystick and displaying the net
|
||||
movement of the motor using an encoder.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Digital</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MotorControl/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Relay</name>
|
||||
<description>Demonstrate controlling a Relay from Joystick buttons.</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Relay/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>PDP CAN Monitoring</name>
|
||||
<description>Demonstrate using CAN to monitor the voltage, current, and temperature in the
|
||||
Power Distribution Panel.</description>
|
||||
<tags>
|
||||
<tag>Complete List</tag>
|
||||
<tag>CAN</tag>
|
||||
<tag>Sensors</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/CANPDP/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Solenoids</name>
|
||||
<description>Demonstrate controlling a single and double solenoid from Joystick buttons.</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Pneumatics</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Solenoid/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Encoder</name>
|
||||
<description>Demonstrate displaying the value of a quadrature encoder on the
|
||||
SmartDashboard.</description>
|
||||
<tags>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Digital</tag>
|
||||
<tag>Sensors</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Encoder/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Arcade Drive</name>
|
||||
<description>An example program which demonstrates the use of Arcade Drive with the DifferentialDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/ArcadeDrive/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Mecanum Drive</name>
|
||||
<description>An example program which demonstrates the use of Mecanum Drive with the MecanumDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MecanumDrive/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Ultrasonic</name>
|
||||
<description>Demonstrate maintaining a set distance using an ultrasonic sensor.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Ultrasonic/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>UltrasonicPID</name>
|
||||
<description>Demonstrate maintaining a set distance using an ultrasonic sensor and PID
|
||||
control.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/UltrasonicPID/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Gyro</name>
|
||||
<description>An example program showing how to drive straight with using a gyro sensor.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
<tag>Joystick</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Gyro/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Gyro Mecanum</name>
|
||||
<description>An example program showing how to perform mecanum drive with field oriented
|
||||
controls.</description>
|
||||
<tags>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
<tag>Joysitck</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GyroMecanum/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>PotentiometerPID</name>
|
||||
<description>An example to demonstrate the use of a potentiometer and PID control to reach
|
||||
elevator position setpoints.</description>
|
||||
<tags>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Sensors</tag>
|
||||
<tag>Analog</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/PotentiometerPID/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Simple Vision</name>
|
||||
<description>The minimal program to acquire images from an attached USB camera on the robot
|
||||
and send them to the dashboard.</description>
|
||||
<tags>
|
||||
<tag>Vision</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/QuickVision/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Intermediate Vision</name>
|
||||
<description>An example program that acquires images from an attached USB camera and adds
|
||||
some
|
||||
annotation to the image as you might do for showing operators the result of some image
|
||||
recognition, and sends it to the dashboard for display.</description>
|
||||
<tags>
|
||||
<tag>Vision</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/IntermediateVision/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>Axis Camera Sample</name>
|
||||
<description>An example program that acquires images from an Axis network camera and adds
|
||||
some
|
||||
annotation to the image as you might do for showing operators the result of some image
|
||||
recognition, and sends it to the dashboard for display. This demonstrates the use of the
|
||||
AxisCamera class.</description>
|
||||
<tags>
|
||||
<tag>Vision</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/AxisCameraSample/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
<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>Complete List</tag>
|
||||
</tags>
|
||||
<world>/usr/share/frcsim/worlds/GearsBotDemo.world</world>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
<package>src/Commands</package>
|
||||
<package>src/Subsystems</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GearsBot/src/Commands/Autonomous.cpp" destination="src/Commands/Autonomous.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/Autonomous.h" destination="src/Commands/Autonomous.h" />
|
||||
<file source="examples/GearsBot/src/Commands/CloseClaw.cpp" destination="src/Commands/CloseClaw.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/CloseClaw.h" destination="src/Commands/CloseClaw.h" />
|
||||
<file source="examples/GearsBot/src/Commands/DriveStraight.cpp" destination="src/Commands/DriveStraight.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/DriveStraight.h" destination="src/Commands/DriveStraight.h" />
|
||||
<file source="examples/GearsBot/src/Commands/OpenClaw.cpp" destination="src/Commands/OpenClaw.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/OpenClaw.h" destination="src/Commands/OpenClaw.h" />
|
||||
<file source="examples/GearsBot/src/Commands/Pickup.cpp" destination="src/Commands/Pickup.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/Pickup.h" destination="src/Commands/Pickup.h" />
|
||||
<file source="examples/GearsBot/src/Commands/Place.cpp" destination="src/Commands/Place.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/Place.h" destination="src/Commands/Place.h" />
|
||||
<file source="examples/GearsBot/src/Commands/PrepareToPickup.cpp" destination="src/Commands/PrepareToPickup.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/PrepareToPickup.h" destination="src/Commands/PrepareToPickup.h" />
|
||||
<file source="examples/GearsBot/src/Commands/SetDistanceToBox.cpp" destination="src/Commands/SetDistanceToBox.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/SetDistanceToBox.h" destination="src/Commands/SetDistanceToBox.h" />
|
||||
<file source="examples/GearsBot/src/Commands/SetElevatorSetpoint.cpp" destination="src/Commands/SetElevatorSetpoint.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/SetElevatorSetpoint.h" destination="src/Commands/SetElevatorSetpoint.h" />
|
||||
<file source="examples/GearsBot/src/Commands/SetWristSetpoint.cpp" destination="src/Commands/SetWristSetpoint.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/SetWristSetpoint.h" destination="src/Commands/SetWristSetpoint.h" />
|
||||
<file source="examples/GearsBot/src/Commands/TankDriveWithJoystick.cpp" destination="src/Commands/TankDriveWithJoystick.cpp" />
|
||||
<file source="examples/GearsBot/src/Commands/TankDriveWithJoystick.h" destination="src/Commands/TankDriveWithJoystick.h" />
|
||||
<file source="examples/GearsBot/src/OI.cpp" destination="src/OI.cpp" />
|
||||
<file source="examples/GearsBot/src/OI.h" destination="src/OI.h" />
|
||||
<file source="examples/GearsBot/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
<file source="examples/GearsBot/src/Robot.h" destination="src/Robot.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Claw.cpp" destination="src/Subsystems/Claw.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Claw.h" destination="src/Subsystems/Claw.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/DriveTrain.cpp" destination="src/Subsystems/DriveTrain.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/DriveTrain.h" destination="src/Subsystems/DriveTrain.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Elevator.cpp" destination="src/Subsystems/Elevator.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Elevator.h" destination="src/Subsystems/Elevator.h" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Wrist.cpp" destination="src/Subsystems/Wrist.cpp" />
|
||||
<file source="examples/GearsBot/src/Subsystems/Wrist.h" destination="src/Subsystems/Wrist.h" />
|
||||
</files>
|
||||
</example>
|
||||
<example>
|
||||
<name>PacGoat</name>
|
||||
<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>Complete List</tag>
|
||||
</tags>
|
||||
<world>/usr/share/frcsim/worlds/PacGoat2014.world</world>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
<package>src/Commands</package>
|
||||
<package>src/Subsystems</package>
|
||||
<package>src/Triggers</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/PacGoat/src/Commands/CheckForHotGoal.cpp" destination="src/Commands/CheckForHotGoal.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/CheckForHotGoal.h" destination="src/Commands/CheckForHotGoal.h" />
|
||||
<file source="examples/PacGoat/src/Commands/CloseClaw.cpp" destination="src/Commands/CloseClaw.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/CloseClaw.h" destination="src/Commands/CloseClaw.h" />
|
||||
<file source="examples/PacGoat/src/Commands/Collect.cpp" destination="src/Commands/Collect.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/Collect.h" destination="src/Commands/Collect.h" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveAndShootAutonomous.cpp" destination="src/Commands/DriveAndShootAutonomous.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveAndShootAutonomous.h" destination="src/Commands/DriveAndShootAutonomous.h" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveForward.cpp" destination="src/Commands/DriveForward.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveForward.h" destination="src/Commands/DriveForward.h" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveWithJoystick.cpp" destination="src/Commands/DriveWithJoystick.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/DriveWithJoystick.h" destination="src/Commands/DriveWithJoystick.h" />
|
||||
<file source="examples/PacGoat/src/Commands/ExtendShooter.cpp" destination="src/Commands/ExtendShooter.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/ExtendShooter.h" destination="src/Commands/ExtendShooter.h" />
|
||||
<file source="examples/PacGoat/src/Commands/LowGoal.cpp" destination="src/Commands/LowGoal.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/LowGoal.h" destination="src/Commands/LowGoal.h" />
|
||||
<file source="examples/PacGoat/src/Commands/OpenClaw.cpp" destination="src/Commands/OpenClaw.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/OpenClaw.h" destination="src/Commands/OpenClaw.h" />
|
||||
<file source="examples/PacGoat/src/Commands/SetCollectionSpeed.cpp" destination="src/Commands/SetCollectionSpeed.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/SetCollectionSpeed.h" destination="src/Commands/SetCollectionSpeed.h" />
|
||||
<file source="examples/PacGoat/src/Commands/SetPivotSetpoint.cpp" destination="src/Commands/SetPivotSetpoint.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/SetPivotSetpoint.h" destination="src/Commands/SetPivotSetpoint.h" />
|
||||
<file source="examples/PacGoat/src/Commands/Shoot.cpp" destination="src/Commands/Shoot.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/Shoot.h" destination="src/Commands/Shoot.h" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForBall.cpp" destination="src/Commands/WaitForBall.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForBall.h" destination="src/Commands/WaitForBall.h" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForPressure.cpp" destination="src/Commands/WaitForPressure.cpp" />
|
||||
<file source="examples/PacGoat/src/Commands/WaitForPressure.h" destination="src/Commands/WaitForPressure.h" />
|
||||
<file source="examples/PacGoat/src/OI.cpp" destination="src/OI.cpp" />
|
||||
<file source="examples/PacGoat/src/OI.h" destination="src/OI.h" />
|
||||
<file source="examples/PacGoat/src/Robot.cpp" destination="src/Robot.cpp" />
|
||||
<file source="examples/PacGoat/src/Robot.h" destination="src/Robot.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Collector.cpp" destination="src/Subsystems/Collector.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Collector.h" destination="src/Subsystems/Collector.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/DriveTrain.cpp" destination="src/Subsystems/DriveTrain.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/DriveTrain.h" destination="src/Subsystems/DriveTrain.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pivot.cpp" destination="src/Subsystems/Pivot.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pivot.h" destination="src/Subsystems/Pivot.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pneumatics.cpp" destination="src/Subsystems/Pneumatics.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Pneumatics.h" destination="src/Subsystems/Pneumatics.h" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Shooter.cpp" destination="src/Subsystems/Shooter.cpp" />
|
||||
<file source="examples/PacGoat/src/Subsystems/Shooter.h" destination="src/Subsystems/Shooter.h" />
|
||||
<file source="examples/PacGoat/src/Triggers/DoubleButton.cpp" destination="src/Triggers/DoubleButton.cpp" />
|
||||
<file source="examples/PacGoat/src/Triggers/DoubleButton.h" destination="src/Triggers/DoubleButton.h" />
|
||||
</files>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin'
|
||||
|
||||
if (!hasProperty('releaseType')) {
|
||||
WPILibVersion {
|
||||
releaseType = 'dev'
|
||||
}
|
||||
}
|
||||
|
||||
def pubVersion
|
||||
if (project.hasProperty("publishVersion")) {
|
||||
pubVersion = project.publishVersion
|
||||
} else {
|
||||
pubVersion = WPILibVersion.version
|
||||
}
|
||||
|
||||
def baseExamplesArtifactId = 'examples'
|
||||
def baseTemplatesArtifactId = 'templates'
|
||||
def artifactGroupId = 'edu.wpi.first.wpilibc'
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
task cppExamplesZip(type: Zip) {
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibc-examples'
|
||||
|
||||
from(licenseFile) {
|
||||
into '/'
|
||||
}
|
||||
|
||||
from('src/main/cpp/examples') {
|
||||
into 'examples'
|
||||
}
|
||||
|
||||
from ('examples.xml') {
|
||||
into 'examples'
|
||||
}
|
||||
}
|
||||
|
||||
task cppTemplatesZip(type: Zip) {
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibc-templates'
|
||||
|
||||
from(licenseFile) {
|
||||
into '/'
|
||||
}
|
||||
|
||||
from('src/main/cpp/templates') {
|
||||
into 'templates'
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn cppTemplatesZip
|
||||
build.dependsOn cppExamplesZip
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
examples(MavenPublication) {
|
||||
artifact cppExamplesZip
|
||||
|
||||
artifactId = baseExamplesArtifactId
|
||||
groupId artifactGroupId
|
||||
version pubVersion
|
||||
}
|
||||
|
||||
templates(MavenPublication) {
|
||||
artifact cppTemplatesZip
|
||||
|
||||
artifactId = baseTemplatesArtifactId
|
||||
groupId artifactGroupId
|
||||
version pubVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin'
|
||||
|
||||
if (!hasProperty('releaseType')) {
|
||||
WPILibVersion {
|
||||
releaseType = 'dev'
|
||||
}
|
||||
}
|
||||
|
||||
def pubVersion
|
||||
if (project.hasProperty("publishVersion")) {
|
||||
pubVersion = project.publishVersion
|
||||
} else {
|
||||
pubVersion = WPILibVersion.version
|
||||
}
|
||||
|
||||
def baseExamplesArtifactId = 'examples'
|
||||
def baseTemplatesArtifactId = 'templates'
|
||||
def artifactGroupId = 'edu.wpi.first.wpilibc'
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
task cppExamplesZip(type: Zip) {
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibc-examples'
|
||||
|
||||
from(licenseFile) {
|
||||
into '/'
|
||||
}
|
||||
|
||||
from('src/main/cpp/examples') {
|
||||
into 'examples'
|
||||
}
|
||||
|
||||
from('examples.xml') {
|
||||
into 'examples'
|
||||
}
|
||||
}
|
||||
|
||||
task cppTemplatesZip(type: Zip) {
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibc-templates'
|
||||
|
||||
from(licenseFile) {
|
||||
into '/'
|
||||
}
|
||||
|
||||
from('src/main/cpp/templates') {
|
||||
into 'templates'
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn cppTemplatesZip
|
||||
build.dependsOn cppExamplesZip
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
examples(MavenPublication) {
|
||||
artifact cppExamplesZip
|
||||
|
||||
artifactId = baseExamplesArtifactId
|
||||
groupId artifactGroupId
|
||||
version pubVersion
|
||||
}
|
||||
|
||||
templates(MavenPublication) {
|
||||
artifact cppTemplatesZip
|
||||
|
||||
artifactId = baseTemplatesArtifactId
|
||||
groupId artifactGroupId
|
||||
version pubVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
// We need to run our vision program in a separate Thread.
|
||||
// If not, our robot program will not run
|
||||
std::thread visionThread(VisionThread);
|
||||
|
||||
@@ -32,14 +32,14 @@ public:
|
||||
* Use the potentiometer as the PID sensor. This method is automatically
|
||||
* called by the subsystem.
|
||||
*/
|
||||
double ReturnPIDInput();
|
||||
double ReturnPIDInput() override;
|
||||
|
||||
/**
|
||||
* Use the motor as the PID output. This method is automatically called
|
||||
* by
|
||||
* the subsystem.
|
||||
*/
|
||||
void UsePIDOutput(double d);
|
||||
void UsePIDOutput(double d) override;
|
||||
|
||||
private:
|
||||
frc::Spark m_motor{5};
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <CameraServer.h>
|
||||
#include <IterativeRobot.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/core/types.hpp>
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
@@ -21,6 +22,7 @@
|
||||
* processing.
|
||||
*/
|
||||
class Robot : public frc::IterativeRobot {
|
||||
#if defined(__linux__)
|
||||
private:
|
||||
static void VisionThread() {
|
||||
// Get the USB camera from CameraServer
|
||||
@@ -58,12 +60,18 @@ private:
|
||||
outputStream.PutFrame(mat);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void RobotInit() {
|
||||
// We need to run our vision program in a separate Thread.
|
||||
// If not, our robot program will not run
|
||||
void RobotInit() override {
|
||||
// We need to run our vision program in a separate Thread.
|
||||
// If not, our robot program will not run
|
||||
#if defined(__linux__)
|
||||
std::thread visionThread(VisionThread);
|
||||
visionThread.detach();
|
||||
#else
|
||||
llvm::errs() << "Vision only available on Linux.\n";
|
||||
llvm::errs().flush();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
class Robot : public frc::IterativeRobot {
|
||||
public:
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
// Invert the left side motors
|
||||
// You may need to change or remove this to match your robot
|
||||
m_frontLeft.SetInverted(true);
|
||||
|
||||
@@ -44,7 +44,7 @@ private:
|
||||
static constexpr int kJoystickChannel = 0;
|
||||
|
||||
// Bottom, middle, and top elevator setpoints
|
||||
static constexpr std::array<double, 3> kSetPoints = {1.0, 2.6, 4.3};
|
||||
static constexpr std::array<double, 3> kSetPoints = {{1.0, 2.6, 4.3}};
|
||||
|
||||
/* proportional, integral, and derivative speed constants; motor
|
||||
* inverted
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <CameraServer.h>
|
||||
#include <IterativeRobot.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
|
||||
/**
|
||||
* Uses the CameraServer class to automatically capture video from a USB webcam
|
||||
@@ -17,8 +18,13 @@
|
||||
*/
|
||||
class Robot : public frc::IterativeRobot {
|
||||
public:
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
#if defined(__linux__)
|
||||
CameraServer::GetInstance()->StartAutomaticCapture();
|
||||
#else
|
||||
llvm::errs() << "Vision only available on Linux.\n";
|
||||
llvm::errs().flush();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user