diff --git a/2021 test code/.gitignore b/2021 test code/.gitignore new file mode 100644 index 00000000..983678aa --- /dev/null +++ b/2021 test code/.gitignore @@ -0,0 +1,161 @@ +# Created by https://www.gitignore.io/api/c++,java,linux,macos,gradle,windows,visualstudiocode + +### C++ ### +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### Gradle ### +.gradle +/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +# # VS Code Specific Java Settings +.classpath +.project +.settings/ +bin/ +imgui.ini + + +# End of https://www.gitignore.io/api/c++,java,linux,macos,gradle,windows,visualstudiocode diff --git a/2021 test code/.vscode/launch.json b/2021 test code/.vscode/launch.json new file mode 100644 index 00000000..c9c9713d --- /dev/null +++ b/2021 test code/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "wpilib", + "name": "WPILib Desktop Debug", + "request": "launch", + "desktop": true, + }, + { + "type": "wpilib", + "name": "WPILib roboRIO Debug", + "request": "launch", + "desktop": false, + } + ] +} diff --git a/2021 test code/.vscode/settings.json b/2021 test code/.vscode/settings.json new file mode 100644 index 00000000..5e795ffd --- /dev/null +++ b/2021 test code/.vscode/settings.json @@ -0,0 +1,18 @@ +{ + "java.configuration.updateBuildConfiguration": "disabled", + "java.import.gradle.enabled": false, + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true, + "bin/": true, + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true, + "**/*~": true + }, + "C_Cpp.default.configurationProvider": "vscode-wpilib" +} diff --git a/2021 test code/.wpilib/wpilib_preferences.json b/2021 test code/.wpilib/wpilib_preferences.json new file mode 100644 index 00000000..4c5e070f --- /dev/null +++ b/2021 test code/.wpilib/wpilib_preferences.json @@ -0,0 +1,6 @@ +{ + "enableCppIntellisense": true, + "currentLanguage": "cpp", + "projectYear": "2021", + "teamNumber": 114 +} \ No newline at end of file diff --git a/2021 test code/WPILib-License.md b/2021 test code/WPILib-License.md new file mode 100644 index 00000000..3d5a824c --- /dev/null +++ b/2021 test code/WPILib-License.md @@ -0,0 +1,24 @@ +Copyright (c) 2009-2021 FIRST and other WPILib contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of FIRST, WPILib, nor the names of other WPILib + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/2021 test code/build.gradle b/2021 test code/build.gradle new file mode 100644 index 00000000..e9bea982 --- /dev/null +++ b/2021 test code/build.gradle @@ -0,0 +1,105 @@ +plugins { + id "cpp" + id "google-test-test-suite" + id "edu.wpi.first.GradleRIO" version "2021.3.1" +} + +// Define my targets (RoboRIO) and artifacts (deployable files) +// This is added by GradleRIO's backing project EmbeddedTools. +deploy { + targets { + roboRIO("roborio") { + // Team number is loaded either from the .wpilib/wpilib_preferences.json + // or from command line. If not found an exception will be thrown. + // You can use getTeamOrDefault(team) instead of getTeamNumber if you + // want to store a team number in this file. + team = frc.getTeamNumber() + } + } + artifacts { + frcNativeArtifact('frcCpp') { + targets << "roborio" + component = 'frcUserProgram' + // Debug can be overridden by command line, for use with VSCode + debug = frc.getDebugOrDefault(false) + } + // Built in artifact to deploy arbitrary files to the roboRIO. + fileTreeArtifact('frcStaticFileDeploy') { + // The directory below is the local directory to deploy + files = fileTree(dir: 'src/main/deploy') + // Deploy to RoboRIO target, into /home/lvuser/deploy + targets << "roborio" + directory = '/home/lvuser/deploy' + } + } +} + +// Set this to true to include the src folder in the include directories passed +// to the compiler. Some eclipse project imports depend on this behavior. +// We recommend leaving this disabled if possible. Note for eclipse project +// imports this is enabled by default. For new projects, its disabled +def includeSrcInIncludeRoot = false + +// Set this to true to enable desktop support. +def includeDesktopSupport = false + +// Enable simulation gui support. Must check the box in vscode to enable support +// upon debugging +dependencies { + simulation wpi.deps.sim.gui(wpi.platforms.desktop, true) + simulation wpi.deps.sim.driverstation(wpi.platforms.desktop, true) + + // Websocket extensions require additional configuration. + // simulation wpi.deps.sim.ws_server(wpi.platforms.desktop, true) + // simulation wpi.deps.sim.ws_client(wpi.platforms.desktop, true) +} + +// Simulation configuration (e.g. environment variables). +sim { + // Sets the websocket client remote host. + // envVar "HALSIMWS_HOST", "10.0.0.2" +} + +model { + components { + frcUserProgram(NativeExecutableSpec) { + targetPlatform wpi.platforms.roborio + if (includeDesktopSupport) { + targetPlatform wpi.platforms.desktop + } + + sources.cpp { + source { + srcDir 'src/main/cpp' + include '**/*.cpp', '**/*.cc' + } + exportedHeaders { + srcDir 'src/main/include' + if (includeSrcInIncludeRoot) { + srcDir 'src/main/cpp' + } + } + } + + // Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries. + wpi.deps.vendor.cpp(it) + wpi.deps.wpilib(it) + } + } + testSuites { + frcUserProgramTest(GoogleTestTestSuiteSpec) { + testing $.components.frcUserProgram + + sources.cpp { + source { + srcDir 'src/test/cpp' + include '**/*.cpp' + } + } + + wpi.deps.vendor.cpp(it) + wpi.deps.wpilib(it) + wpi.deps.googleTest(it) + } + } +} diff --git a/2021 test code/gradle/wrapper/gradle-wrapper.jar b/2021 test code/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..cc4fdc29 Binary files /dev/null and b/2021 test code/gradle/wrapper/gradle-wrapper.jar differ diff --git a/2021 test code/gradle/wrapper/gradle-wrapper.properties b/2021 test code/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..d050f177 --- /dev/null +++ b/2021 test code/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=permwrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=permwrapper/dists diff --git a/2021 test code/gradlew b/2021 test code/gradlew new file mode 100644 index 00000000..2fe81a7d --- /dev/null +++ b/2021 test code/gradlew @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/2021 test code/gradlew.bat b/2021 test code/gradlew.bat new file mode 100644 index 00000000..9618d8d9 --- /dev/null +++ b/2021 test code/gradlew.bat @@ -0,0 +1,100 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/2021 test code/settings.gradle b/2021 test code/settings.gradle new file mode 100644 index 00000000..0bc697ad --- /dev/null +++ b/2021 test code/settings.gradle @@ -0,0 +1,27 @@ +import org.gradle.internal.os.OperatingSystem + +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + String frcYear = '2021' + File frcHome + if (OperatingSystem.current().isWindows()) { + String publicFolder = System.getenv('PUBLIC') + if (publicFolder == null) { + publicFolder = "C:\\Users\\Public" + } + def homeRoot = new File(publicFolder, "wpilib") + frcHome = new File(homeRoot, frcYear) + } else { + def userFolder = System.getProperty("user.home") + def homeRoot = new File(userFolder, "wpilib") + frcHome = new File(homeRoot, frcYear) + } + def frcHomeMaven = new File(frcHome, 'maven') + maven { + name 'frcHome' + url frcHomeMaven + } + } +} diff --git a/2021 test code/src/main/cpp/Channel.cpp b/2021 test code/src/main/cpp/Channel.cpp new file mode 100644 index 00000000..59c2c2b0 --- /dev/null +++ b/2021 test code/src/main/cpp/Channel.cpp @@ -0,0 +1,17 @@ +#include "Channel.h" + +Channel::Channel() +{ + +} + +void Channel::periodic(Controls &controls) +{ + run(controls); +} + +void Channel::run(Controls &controls) +{ + frontMotor.Set(ControlMode::PercentOutput, controls.intake() * -0.65); //test values + sideMotor.Set(ControlMode::PercentOutput, controls.intake() * -0.65); //test values, figure out sensor thing +} \ No newline at end of file diff --git a/2021 test code/src/main/cpp/Controls.cpp b/2021 test code/src/main/cpp/Controls.cpp new file mode 100644 index 00000000..e85d0482 --- /dev/null +++ b/2021 test code/src/main/cpp/Controls.cpp @@ -0,0 +1,79 @@ +#include "Controls.h" + +Controls::Controls(controlMethod setMethod) : method{setMethod}, gamecube{setMethod - 1}, lJoy{setMethod * 2}, rJoy{setMethod + 1} +{ + //I know this is a horrible solution but I couldn't find a better one while still + //using an enum and I'm the only one using the gamecube so it should be fine +} + +/** + * gets the input based on control method for throttle + */ +double Controls::throttle() +{ + if(method == controlMethod::gamecubeController) + { + double value = -gamecube.GetRawAxis(1); + if (value > -0.08 || value < -0.28) + { + return value; + } else {return 0;} + }else if (method == controlMethod::joysticks) + { + return lJoy.GetY(); + }else + { + return 0; + } +} +/** + * gets the input based on control method for turn + */ +double Controls::turn() +{ + if(method == controlMethod::gamecubeController) + { + double value = -gamecube.GetRawAxis(0); + if (value > 0.15 || value < -0.15) + { + return value; + } else {return 0;} + }else if(method == controlMethod::joysticks) + { + return -rJoy.GetX(); + }else + { + return 0; + } + +} + +bool Controls::readyShot() { return lJoy.GetTrigger(); } //unfished for gamecube +bool Controls::shoot() { return rJoy.GetTrigger(); } //unfished for gamecube + +int Controls::intake() +{ + if(method == controlMethod::gamecubeController) + { + return gamecube.GetRawButton(1) - gamecube.GetRawButton(2); + }else if(method == controlMethod::joysticks) + { + return lJoy.GetRawButton(3) - rJoy.GetRawButton(4); + }else + { + return 0; + } +} +int Controls::deploy() { return lJoy.GetRawButton(2) - rJoy.GetRawButton(2); } //unfished for gamecube, probably don't need + +bool Controls::spinWheel() { return rJoy.GetRawButton(4); } //unfished for gamecube + +/* + +trigger 1 (check numbers) +bottom 2 +left 3 +right 4 +other stuff + +*/ \ No newline at end of file diff --git a/2021 test code/src/main/cpp/Drive.cpp b/2021 test code/src/main/cpp/Drive.cpp new file mode 100644 index 00000000..0959722e --- /dev/null +++ b/2021 test code/src/main/cpp/Drive.cpp @@ -0,0 +1,32 @@ +#include "Drive.h" + +/** + * sets direction and slave master relationships + */ +Drive::Drive() +{ + leftM.SetInverted(TalonFXInvertType::CounterClockwise); + rightM.SetInverted(TalonFXInvertType::CounterClockwise); + leftS.SetInverted(TalonFXInvertType::FollowMaster); + rightS.SetInverted(TalonFXInvertType::CounterClockwise); + + leftS.Follow(leftM); + rightS.Follow(rightM); +} + +/** + * sets neutral mode and drives the robot + */ +void Drive::periodic(Controls& controls) +{ + leftM.SetNeutralMode(Brake); + leftS.SetNeutralMode(Brake); + rightM.SetNeutralMode(Brake); + rightS.SetNeutralMode(Brake); + driveSet.ArcadeDrive(controls.throttle(), controls.turn(), false); + +} + +void Drive::drive(double throttle, double turn) { driveSet.ArcadeDrive(throttle, turn, false); } +void Drive::autoDrive() { driveSet.ArcadeDrive(0.2, 0.0, false); } +void Drive::stop() { driveSet.ArcadeDrive(0, 0, false); } \ No newline at end of file diff --git a/2021 test code/src/main/cpp/Intake.cpp b/2021 test code/src/main/cpp/Intake.cpp new file mode 100644 index 00000000..f638f958 --- /dev/null +++ b/2021 test code/src/main/cpp/Intake.cpp @@ -0,0 +1,70 @@ +#include "Intake.h" + +Intake::Intake() +{ + +} + +/** + * right no just calls intake function + */ +void Intake::periodic(Controls &controls) +{ + intake(controls); + + /*switch(state) + { + case State::Intaking: + intake(); + break; + case State::Unjamming: + unjam(); + break; + case State::Idle: + intakeMotor.Set(ControlMode::PercentOutput, 0); + break; + }*/ +} + +/** + * sets the desired state for the intake + */ +void Intake::setState(Intake::State setState) +{ + state = setState; +} + +/** + * sets the intake's motor speed based on control inputs, calls deploy function + */ +void Intake::intake(Controls &controls) +{ + if(controls.intake() != 0) + { + deploy(); + }else + { + retract(); + } + intakeMotor.Set(ControlMode::PercentOutput, controls.intake() * 0.65); //test powers +} + +/** + * there is no motor or pneumatic to deploy the intake right now + */ +void Intake::deploy() +{ + if(isDeployed()/* || controls.deploy() == 0*/) + return; + //do something with pneumatics or motors + deployed = true; + + +} +void Intake::retract() +{ + if(!isDeployed()) + return; + //do something with pneumatics or motors + deployed = false; +} \ No newline at end of file diff --git a/2021 test code/src/main/cpp/Limelight.cpp b/2021 test code/src/main/cpp/Limelight.cpp new file mode 100644 index 00000000..4bfe2833 --- /dev/null +++ b/2021 test code/src/main/cpp/Limelight.cpp @@ -0,0 +1,21 @@ +#include "Limelight.h" + +Limelight::Limelight() +{ + table = nt::NetworkTableInstance::GetDefault().GetTable("limelight"); +} + +double Limelight::getX() { return table->GetNumber("tx", 100); } +double Limelight::getY() { return table->GetNumber("ty", 100); } + +double Limelight::getDistance() +{ + //zero x? + double angle, y; + if((y = getY()) == 100) + { + return -1; + } + angle = y + VERTICAL_ANGLE_OFFSET; + return GOAL_HEIGHT / tan(angle); +} \ No newline at end of file diff --git a/2021 test code/src/main/cpp/Robot.cpp b/2021 test code/src/main/cpp/Robot.cpp new file mode 100644 index 00000000..fa218a42 --- /dev/null +++ b/2021 test code/src/main/cpp/Robot.cpp @@ -0,0 +1,108 @@ +#include "Robot.h" +#include +#include + +/** + * nothing, mostly just use constructor instead + */ +void Robot::RobotInit() {} + +/** + * initiate robot, call subsystems' constructors + */ +Robot::Robot() : frc::TimedRobot{}, timer{}, controls{Controls::controlMethod::gamecubeController}, drive{}, intake{}, shoot{} +{ + +} + +/** + * This function is called every robot packet, no matter the mode. Use + * this for items like diagnostics that you want ran during disabled, + * autonomous, teleoperated and test. + * + *

This runs after the mode specific periodic functions, but before + * LiveWindow and SmartDashboard integrated updating. + */ +void Robot::RobotPeriodic() +{ + +} + +/** + * This autonomous (along with the chooser code above) shows how to select + * between different autonomous modes using the dashboard. The sendable chooser + * code works with the Java SmartDashboard. If you prefer the LabVIEW Dashboard, + * remove all of the chooser code and uncomment the GetString line to get the + * auto name from the text box below the Gyro. + * + * You can add additional auto modes by adding additional comparisons to the + * if-else structure below with additional strings. If using the SendableChooser + * make sure to add them to the chooser code above as well. + */ +void Robot::AutonomousInit() +{ + timer.Reset(); + timer.Start(); +} +void Robot::AutonomousPeriodic() +{ + if (timer.Get() < 1) + { + drive.autoDrive(); + }else + { + drive.stop(); + } + +} + +void Robot::TeleopInit() {} +/** + * call subsystem periodics, probably other stuff later on + */ +void Robot::TeleopPeriodic() //I do like using a controls class, but passing it each time feels not right, is there a way to make like a global controls class +{ + timer.Stop(); + drive.periodic(controls); + intake.periodic(controls); + channel.periodic(controls); + + Shoot::state state = shoot.periodic(controls); + switch(state) + { + case Shoot::idle: + shoot.stop(); + break; + case Shoot::aiming: //something about overriding drive? + drive.drive(0, shoot.horizontalAim()); + //something with vertical hood + break; + case Shoot::shooting: + shoot.shootShot(); + break; + } + +} + +/** + * probably nothing, disabled shouldn't do anything + */ +void Robot::DisabledInit() {} +/** + * probably nothing, don't want anybody dying when it's disabled + */ +void Robot::DisabledPeriodic() {} + +/** + * nothing, just test with main ones + */ +void Robot::TestInit() {} +/** + * nothing, just test with main ones + */ +void Robot::TestPeriodic() {} + +#ifndef RUNNING_FRC_TESTS +int main() { return frc::StartRobot(); } +#endif + diff --git a/2021 test code/src/main/cpp/Shoot.cpp b/2021 test code/src/main/cpp/Shoot.cpp new file mode 100644 index 00000000..94a380e7 --- /dev/null +++ b/2021 test code/src/main/cpp/Shoot.cpp @@ -0,0 +1,87 @@ +#include "Shoot.h" + +Shoot::Shoot() : limelight{} +{ + leftFly.SetInverted(TalonFXInvertType::Clockwise); //TODO check for legit safety reasons + rightFly.SetInverted(TalonFXInvertType::CounterClockwise); + + //shootS.Follow(shootM); +} + +Shoot::state Shoot::periodic(Controls &controls) +{ + if(controls.readyShot()) + { + if(controls.shoot()) + { + currentState = Shoot::shooting; + }else + { + currentState = Shoot::aiming; + } + }else + { + currentState = Shoot::idle; + } + + return currentState; + +} + +void Shoot::spinUp(double speed) +{ + + flywheelGroup.Set(speed); //PID? +} + +void Shoot::stop() +{ + flywheelGroup.Set(0); + kicker.Set(0); + //something with hood +} + +void Shoot::shootShot() +{ + kicker.Set(ControlMode::PercentOutput, 0.45); //TODO test value +} + +double Shoot::horizontalAim() //TODO something with not finding a target +{ + double prevError, deltaError; + + prevError += hError; + hError = limelight.getX(); + if( abs(hError) < 0.5 ) //TODO test this value, also is this need if I have a PID? I just don't think I can perfectly fix oscilations + { + return 0; + } + deltaError = hError - prevError; + + double power = (aimTKp * hError) + (aimTKi * prevError) + (aimTKd * deltaError); + + if (power < -0.85) power = -0.85; + if (power > 0.85) power = 0.85; + + return power; +} + +double Shoot::verticalAim()//TODO very unfinished +{ + double prevError, deltaError; + + prevError += vError; + //vError = something idk + if( abs(vError) < 0.5 ) + { + return 0; + } + deltaError = vError - prevError; + + double power = (aimTKp * vError) + (aimTKi * prevError) + (aimTKd * deltaError); + + if (power < -0.85) power = -0.85; + if (power > 0.85) power = 0.85; + + return power; +} \ No newline at end of file diff --git a/2021 test code/src/main/deploy/example.txt b/2021 test code/src/main/deploy/example.txt new file mode 100644 index 00000000..68395391 --- /dev/null +++ b/2021 test code/src/main/deploy/example.txt @@ -0,0 +1,4 @@ +Files placed in this directory will be deployed to the RoboRIO into the + 'deploy' directory in the home folder. Use the 'frc::filesystem::GetDeployDirectory' + function from the 'frc/Filesystem.h' header to get a proper path relative to the deploy + directory. \ No newline at end of file diff --git a/2021 test code/src/main/include/Channel.h b/2021 test code/src/main/include/Channel.h new file mode 100644 index 00000000..23f7c07e --- /dev/null +++ b/2021 test code/src/main/include/Channel.h @@ -0,0 +1,20 @@ +#pragma once + +#include "ctre/Phoenix.h" +#include "frc/WPILib.h" +#include + +#include "Controls.h" + +class Channel +{ + public: + Channel(); + void periodic(Controls &controls); + void run(Controls &controls); + + private: + WPI_TalonSRX &frontMotor = *new WPI_TalonSRX(43); + WPI_TalonSRX &sideMotor = *new WPI_TalonSRX(44); + +}; \ No newline at end of file diff --git a/2021 test code/src/main/include/Controls.h b/2021 test code/src/main/include/Controls.h new file mode 100644 index 00000000..6a88ea4e --- /dev/null +++ b/2021 test code/src/main/include/Controls.h @@ -0,0 +1,33 @@ +#pragma once +#include +#include "iostream" + +class Controls +{ + public: + enum controlMethod + { + joysticks = 0, + gamecubeController = 1 + }; + + Controls(controlMethod method); + + double throttle(); + double turn(); + + bool readyShot(); + bool shoot(); + + int intake(); + int deploy(); + + bool spinWheel(); + + private: + controlMethod method; + frc::Joystick gamecube; + frc::Joystick lJoy; + frc::Joystick rJoy; + +}; diff --git a/2021 test code/src/main/include/Drive.h b/2021 test code/src/main/include/Drive.h new file mode 100644 index 00000000..d6b2c849 --- /dev/null +++ b/2021 test code/src/main/include/Drive.h @@ -0,0 +1,51 @@ +#pragma once + +#include "ctre/Phoenix.h" +#include "frc/WPILib.h" +#include +#include +#include +#include +#include +#include +#include "Controls.h" +#include +#include +#include +#include +#include "iostream" + +class Drive +{ + public: + Drive(); + void periodic(Controls& controls); + void autoDrive(); + void drive(double throttle, double turn); + void stop(); + + private: + WPI_TalonFX &leftM = *new WPI_TalonFX(22); + WPI_TalonFX &leftS = *new WPI_TalonFX(21); + WPI_TalonFX &rightM = *new WPI_TalonFX(23); + WPI_TalonFX &rightS = *new WPI_TalonFX(24); + /* + 25 - left flywheel + 26 - right flywheel + + 2 - kicker + 52 - hood + 20 - intake + 31 - wheel thing (not connected) + 42 - connected to nothing (farthest towards the intake/right) + 43 - serializer front (motor not connected) + 44 - second section of serializer (motor not connected) + 19 - connected to nothing + + */ + + frc::SpeedControllerGroup leftGroup{leftM, leftS}; + frc::SpeedControllerGroup rightGroup{rightM, rightS}; + frc::DifferentialDrive driveSet{leftGroup, rightGroup}; + +}; diff --git a/2021 test code/src/main/include/Intake.h b/2021 test code/src/main/include/Intake.h new file mode 100644 index 00000000..c5f4fc34 --- /dev/null +++ b/2021 test code/src/main/include/Intake.h @@ -0,0 +1,34 @@ +#pragma once + +#include "ctre/Phoenix.h" +#include "frc/WPILib.h" +#include + +#include "Controls.h" + +class Intake +{ + public: + enum State //Here for if it is needed in the future, no use for it right now + { + Idle, + Intaking, + Unjamming + }; + + Intake(); + void periodic(Controls &controls); + void setState(State state); + + void intake(Controls &controls); + void deploy(); + void retract(); + + bool isDeployed() {return deployed; }; + + private: + WPI_TalonSRX &intakeMotor = *new WPI_TalonSRX(20); + State state; + bool deployed = false; + +}; \ No newline at end of file diff --git a/2021 test code/src/main/include/Limelight.h b/2021 test code/src/main/include/Limelight.h new file mode 100644 index 00000000..e95bb23b --- /dev/null +++ b/2021 test code/src/main/include/Limelight.h @@ -0,0 +1,19 @@ +#include "networktables/NetworkTable.h" +#include "networktables/NetworkTableInstance.h" +#include + +class Limelight{ + public: + Limelight(); + double getX(); + double getY(); + double getDistance(); + + const double VERTICAL_ANGLE_OFFSET = 0; //TODO measure values + const double VERTICAL_HEIGHT_OFFSET = 0; + const double GOAL_HEIGHT = 0; + + private: + std::shared_ptr table; //TODO figure out what shared pointer is + +}; \ No newline at end of file diff --git a/2021 test code/src/main/include/Robot.h b/2021 test code/src/main/include/Robot.h new file mode 100644 index 00000000..007f13e4 --- /dev/null +++ b/2021 test code/src/main/include/Robot.h @@ -0,0 +1,47 @@ +#pragma once + +#include + +#include +#include +#include + +#include "Controls.h" +#include "Drive.h" +#include "Intake.h" +#include "Channel.h" +#include "Shoot.h" + +class Robot : public frc::TimedRobot { + public: + + Robot(); + + void RobotInit() override; + void RobotPeriodic() override; + + void AutonomousInit() override; + void AutonomousPeriodic() override; + + void TeleopInit() override; + void TeleopPeriodic() override; + + void DisabledInit() override; + void DisabledPeriodic() override; + + void TestInit() override; + void TestPeriodic() override; + + private: + /*frc::SendableChooser m_chooser; + const std::string kAutoNameDefault = "Default"; + const std::string kAutoNameCustom = "My Auto"; + std::string m_autoSelected;*/ + + frc::Timer timer; + Controls controls; + Drive drive; + Intake intake; + Channel channel; + Shoot shoot; +}; diff --git a/2021 test code/src/main/include/Shoot.h b/2021 test code/src/main/include/Shoot.h new file mode 100644 index 00000000..8d46dc18 --- /dev/null +++ b/2021 test code/src/main/include/Shoot.h @@ -0,0 +1,44 @@ +#pragma once + +#include +#include +#include +#include "ctre/Phoenix.h" +#include "frc/WPILib.h" +#include + +#include "Limelight.h" +#include "Controls.h" + +class Shoot +{ + public: + enum state + { + aiming, shooting, idle + }; + Shoot(); + state periodic(Controls &controls); + void spinUp(double speed); + void shootShot(); + void stop(); + double horizontalAim(); + double verticalAim(); + + const double aimTKi = 0.0; //TODO testing at some point + const double aimTKp = 0.0; + const double aimTKd = 0.0; + double hError = 0.0; + double vError = 0.0; + + private: + Limelight limelight; + + WPI_TalonSRX &kicker = *new WPI_TalonSRX(2); + WPI_TalonFX &leftFly = *new WPI_TalonFX(25); + WPI_TalonFX &rightFly = *new WPI_TalonFX(26); + + frc::SpeedControllerGroup flywheelGroup{leftFly, rightFly}; //hopefully they can go different directions + + state currentState; +}; \ No newline at end of file diff --git a/2021 test code/src/test/cpp/main.cpp b/2021 test code/src/test/cpp/main.cpp new file mode 100644 index 00000000..b8b23d23 --- /dev/null +++ b/2021 test code/src/test/cpp/main.cpp @@ -0,0 +1,10 @@ +#include + +#include "gtest/gtest.h" + +int main(int argc, char** argv) { + HAL_Initialize(500, 0); + ::testing::InitGoogleTest(&argc, argv); + int ret = RUN_ALL_TESTS(); + return ret; +} diff --git a/2021 test code/vendordeps/Phoenix.json b/2021 test code/vendordeps/Phoenix.json new file mode 100644 index 00000000..87f03cbf --- /dev/null +++ b/2021 test code/vendordeps/Phoenix.json @@ -0,0 +1,214 @@ +{ + "fileName": "Phoenix.json", + "name": "CTRE-Phoenix", + "version": "5.19.4", + "uuid": "ab676553-b602-441f-a38d-f1296eff6537", + "mavenUrls": [ + "https://devsite.ctr-electronics.com/maven/release/" + ], + "jsonUrl": "https://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/Phoenix-latest.json", + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-java", + "version": "5.19.4" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-java", + "version": "5.19.4" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.19.4", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ] + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.19.4", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "simTalonSRX", + "version": "5.19.4", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "simVictorSPX", + "version": "5.19.4", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-cpp", + "version": "5.19.4", + "libName": "CTRE_Phoenix_WPI", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-cpp", + "version": "5.19.4", + "libName": "CTRE_Phoenix", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.19.4", + "libName": "CTRE_PhoenixCCI", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ] + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.19.4", + "libName": "CTRE_PhoenixCCISim", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "diagnostics", + "version": "5.19.4", + "libName": "CTRE_PhoenixDiagnostics", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "canutils", + "version": "5.19.4", + "libName": "CTRE_PhoenixCanutils", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "platform-sim", + "version": "5.19.4", + "libName": "CTRE_PhoenixPlatform", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "core", + "version": "5.19.4", + "libName": "CTRE_PhoenixCore", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "simTalonSRX", + "version": "5.19.4", + "libName": "CTRE_SimTalonSRX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "simVictorSPX", + "version": "5.19.4", + "libName": "CTRE_SimVictorSPX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxx86-64" + ] + } + ] +} \ No newline at end of file diff --git a/2021 test code/vendordeps/WPILibNewCommands.json b/2021 test code/vendordeps/WPILibNewCommands.json new file mode 100644 index 00000000..83de291e --- /dev/null +++ b/2021 test code/vendordeps/WPILibNewCommands.json @@ -0,0 +1,37 @@ +{ + "fileName": "WPILibNewCommands.json", + "name": "WPILib-New-Commands", + "version": "2020.0.0", + "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", + "mavenUrls": [], + "jsonUrl": "", + "javaDependencies": [ + { + "groupId": "edu.wpi.first.wpilibNewCommands", + "artifactId": "wpilibNewCommands-java", + "version": "wpilib" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "edu.wpi.first.wpilibNewCommands", + "artifactId": "wpilibNewCommands-cpp", + "version": "wpilib", + "libName": "wpilibNewCommands", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxraspbian", + "linuxaarch64bionic", + "windowsx86-64", + "windowsx86", + "linuxx86-64", + "osxx86-64" + ] + } + ] +} \ No newline at end of file diff --git a/2021 test code/vendordeps/WPILibOldCommands.json b/2021 test code/vendordeps/WPILibOldCommands.json new file mode 100644 index 00000000..7bdad212 --- /dev/null +++ b/2021 test code/vendordeps/WPILibOldCommands.json @@ -0,0 +1,37 @@ +{ + "fileName": "WPILibOldCommands.json", + "name": "WPILib-Old-Commands", + "version": "2020.0.0", + "uuid": "b066afc2-5c18-43c4-b758-43381fcb275e", + "mavenUrls": [], + "jsonUrl": "", + "javaDependencies": [ + { + "groupId": "edu.wpi.first.wpilibOldCommands", + "artifactId": "wpilibOldCommands-java", + "version": "wpilib" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "edu.wpi.first.wpilibOldCommands", + "artifactId": "wpilibOldCommands-cpp", + "version": "wpilib", + "libName": "wpilibOldCommands", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxraspbian", + "linuxaarch64bionic", + "windowsx86-64", + "windowsx86", + "linuxx86-64", + "osxx86-64" + ] + } + ] +} diff --git a/2021 test code/vendordeps/navx_frc.json b/2021 test code/vendordeps/navx_frc.json new file mode 100644 index 00000000..ad23f3b9 --- /dev/null +++ b/2021 test code/vendordeps/navx_frc.json @@ -0,0 +1,35 @@ +{ + "fileName": "navx_frc.json", + "name": "KauaiLabs_navX_FRC", + "version": "4.0.428", + "uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", + "mavenUrls": [ + "https://repo1.maven.org/maven2/" + ], + "jsonUrl": "https://www.kauailabs.com/dist/frc/2021/navx_frc.json", + "javaDependencies": [ + { + "groupId": "com.kauailabs.navx.frc", + "artifactId": "navx-java", + "version": "4.0.428" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "com.kauailabs.navx.frc", + "artifactId": "navx-cpp", + "version": "4.0.428", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": false, + "libName": "navx_frc", + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxraspbian", + "windowsx86-64" + ] + } + ] +} \ No newline at end of file