Skip to content

Commit 7a471bb

Browse files
committed
Initial commit
0 parents  commit 7a471bb

File tree

19 files changed

+1118
-0
lines changed

19 files changed

+1118
-0
lines changed

.gitignore

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/gradle,intellij,macos
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,intellij,macos
4+
5+
### Intellij ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# Generated files
17+
.idea/**/contentModel.xml
18+
19+
# Sensitive or high-churn files
20+
.idea/**/dataSources/
21+
.idea/**/dataSources.ids
22+
.idea/**/dataSources.local.xml
23+
.idea/**/sqlDataSources.xml
24+
.idea/**/dynamic.xml
25+
.idea/**/uiDesigner.xml
26+
.idea/**/dbnavigator.xml
27+
28+
# Gradle
29+
.idea/**/gradle.xml
30+
.idea/**/libraries
31+
32+
# Gradle and Maven with auto-import
33+
# When using Gradle or Maven with auto-import, you should exclude module files,
34+
# since they will be recreated, and may cause churn. Uncomment if using
35+
# auto-import.
36+
.idea/artifacts
37+
.idea/compiler.xml
38+
.idea/jarRepositories.xml
39+
.idea/modules.xml
40+
.idea/*.iml
41+
.idea/modules
42+
*.iml
43+
*.ipr
44+
45+
# CMake
46+
cmake-build-*/
47+
48+
# Mongo Explorer plugin
49+
.idea/**/mongoSettings.xml
50+
51+
# File-based project format
52+
*.iws
53+
54+
# IntelliJ
55+
out/
56+
57+
# mpeltonen/sbt-idea plugin
58+
.idea_modules/
59+
60+
# JIRA plugin
61+
atlassian-ide-plugin.xml
62+
63+
# Cursive Clojure plugin
64+
.idea/replstate.xml
65+
66+
# Crashlytics plugin (for Android Studio and IntelliJ)
67+
com_crashlytics_export_strings.xml
68+
crashlytics.properties
69+
crashlytics-build.properties
70+
fabric.properties
71+
72+
# Editor-based Rest Client
73+
.idea/httpRequests
74+
75+
# Android studio 3.1+ serialized cache file
76+
.idea/caches/build_file_checksums.ser
77+
78+
### Intellij Patch ###
79+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
80+
81+
# *.iml
82+
# modules.xml
83+
# .idea/misc.xml
84+
# *.ipr
85+
86+
# Sonarlint plugin
87+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
88+
.idea/**/sonarlint/
89+
90+
# SonarQube Plugin
91+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
92+
.idea/**/sonarIssues.xml
93+
94+
# Markdown Navigator plugin
95+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
96+
.idea/**/markdown-navigator.xml
97+
.idea/**/markdown-navigator-enh.xml
98+
.idea/**/markdown-navigator/
99+
100+
# Cache file creation bug
101+
# See https://youtrack.jetbrains.com/issue/JBR-2257
102+
.idea/$CACHE_FILE$
103+
104+
# CodeStream plugin
105+
# https://plugins.jetbrains.com/plugin/12206-codestream
106+
.idea/codestream.xml
107+
108+
### macOS ###
109+
# General
110+
.DS_Store
111+
.AppleDouble
112+
.LSOverride
113+
114+
# Icon must end with two \r
115+
Icon
116+
117+
118+
# Thumbnails
119+
._*
120+
121+
# Files that might appear in the root of a volume
122+
.DocumentRevisions-V100
123+
.fseventsd
124+
.Spotlight-V100
125+
.TemporaryItems
126+
.Trashes
127+
.VolumeIcon.icns
128+
.com.apple.timemachine.donotpresent
129+
130+
# Directories potentially created on remote AFP share
131+
.AppleDB
132+
.AppleDesktop
133+
Network Trash Folder
134+
Temporary Items
135+
.apdisk
136+
137+
### Gradle ###
138+
.gradle
139+
build/
140+
141+
# Ignore Gradle GUI config
142+
gradle-app.setting
143+
144+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
145+
!gradle-wrapper.jar
146+
147+
# Cache of project
148+
.gradletasknamecache
149+
150+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
151+
# gradle/wrapper/gradle-wrapper.properties
152+
153+
### Gradle Patch ###
154+
**/build/
155+
156+
# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij,macos

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries-with-intellij-classes.xml

Lines changed: 65 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.wpilib/wpilib_preferences.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"enableCppIntellisense": false,
3+
"currentLanguage": "java",
4+
"projectYear": "2021",
5+
"teamNumber": 2767
6+
}

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CTRE Configs Checker
2+
3+
Help keep track of CTRE device configuration classes from season to season.
4+
5+
## Instructions
6+
7+
1. Update `vendordeps/Phoenix.json` to the version you want to check against.
8+
2. Run unit tests with `gradlew test`.
9+
3. Tests will fail if any fields are added to configuration classes or if the default values have changed.
10+
11+
## Classes Checked
12+
13+
These checks are up to date with the Phoenix 5.19.4 API.
14+
15+
16+
![CTRE class diagram](ctre.png)

WPILib-License.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2009-2021 FIRST and other WPILib contributors
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
* Neither the name of FIRST, WPILib, nor the names of other WPILib
12+
contributors may be used to endorse or promote products derived from
13+
this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

build.gradle

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
plugins {
2+
id "java"
3+
id "edu.wpi.first.GradleRIO" version "2021.2.2"
4+
}
5+
6+
sourceCompatibility = JavaVersion.VERSION_11
7+
targetCompatibility = JavaVersion.VERSION_11
8+
9+
def ROBOT_MAIN_CLASS = "frc.robot.Main"
10+
11+
// Define my targets (RoboRIO) and artifacts (deployable files)
12+
// This is added by GradleRIO's backing project EmbeddedTools.
13+
deploy {
14+
targets {
15+
roboRIO("roborio") {
16+
// Team number is loaded either from the .wpilib/wpilib_preferences.json
17+
// or from command line. If not found an exception will be thrown.
18+
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
19+
// want to store a team number in this file.
20+
team = frc.getTeamNumber()
21+
}
22+
}
23+
artifacts {
24+
frcJavaArtifact('frcJava') {
25+
targets << "roborio"
26+
// Debug can be overridden by command line, for use with VSCode
27+
debug = frc.getDebugOrDefault(false)
28+
}
29+
// Built in artifact to deploy arbitrary files to the roboRIO.
30+
fileTreeArtifact('frcStaticFileDeploy') {
31+
// The directory below is the local directory to deploy
32+
files = fileTree(dir: 'src/main/deploy')
33+
// Deploy to RoboRIO target, into /home/lvuser/deploy
34+
targets << "roborio"
35+
directory = '/home/lvuser/deploy'
36+
}
37+
}
38+
}
39+
40+
// Set this to true to enable desktop support.
41+
def includeDesktopSupport = false
42+
43+
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
44+
// Also defines JUnit 4.
45+
dependencies {
46+
implementation wpi.deps.wpilib()
47+
nativeZip wpi.deps.wpilibJni(wpi.platforms.roborio)
48+
nativeDesktopZip wpi.deps.wpilibJni(wpi.platforms.desktop)
49+
50+
51+
implementation wpi.deps.vendor.java()
52+
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
53+
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
54+
55+
testImplementation(platform('org.junit:junit-bom:5.7.1'))
56+
testImplementation('org.junit.jupiter:junit-jupiter')
57+
58+
// Enable simulation gui support. Must check the box in vscode to enable support
59+
// upon debugging
60+
simulation wpi.deps.sim.gui(wpi.platforms.desktop, false)
61+
simulation wpi.deps.sim.driverstation(wpi.platforms.desktop, false)
62+
63+
// Websocket extensions require additional configuration.
64+
// simulation wpi.deps.sim.ws_server(wpi.platforms.desktop, false)
65+
// simulation wpi.deps.sim.ws_client(wpi.platforms.desktop, false)
66+
}
67+
68+
test {
69+
useJUnitPlatform()
70+
testLogging {
71+
events "passed", "skipped", "failed"
72+
}
73+
}
74+
75+
// Simulation configuration (e.g. environment variables).
76+
sim {
77+
// Sets the websocket client remote host.
78+
// envVar "HALSIMWS_HOST", "10.0.0.2"
79+
}
80+
81+
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
82+
// in order to make them all available at runtime. Also adding the manifest so WPILib
83+
// knows where to look for our Robot Class.
84+
jar {
85+
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
86+
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
87+
}

ctre.png

479 KB
Loading

0 commit comments

Comments
 (0)