From 8b7711f9b0d3db249874a673509f11804d92b537 Mon Sep 17 00:00:00 2001 From: Garin Hamburg <76193294+GarinHamburg@users.noreply.github.com> Date: Thu, 2 Jun 2022 14:27:45 -0700 Subject: [PATCH] Initial Commit Still need to configure everything, tons of code to gut still, gyro needs to be plugged in on physical system --- Hindsight/WPILib-License.md | 24 ++ Hindsight/build.gradle | 99 +++++ .../exe/frcUserProgram/debug/frcUserProgram | Bin 0 -> 105860 bytes .../frcUserProgram/debug/frcUserProgram.debug | Bin 0 -> 1419356 bytes .../exe/frcUserProgram/release/frcUserProgram | Bin 0 -> 92908 bytes .../release/frcUserProgram.debug | Bin 0 -> 35568 bytes .../1g3eugptxy1gctrknso39q7c4/UDPReceiver.o | Bin 0 -> 369220 bytes .../1q3nmz23eyq7mv8szac7tikov/Intake.o | Bin 0 -> 234360 bytes .../1t6w95zfw02hopzpza37pqapf/Utility.o | Bin 0 -> 272296 bytes .../2j8c7ksxu2yzswcvp2bkatkix/FlightStick.o | Bin 0 -> 150900 bytes .../3bg5a77l7vd4edmrxq5jco6ri/Robot.o | Bin 0 -> 1168244 bytes .../4ipmwnvld91t21754bsvxe4fw/DriveBase.o | Bin 0 -> 253512 bytes .../9inwptvhlqwch3x6exfxgqlg3/Xbox.o | Bin 0 -> 150496 bytes .../1g3eugptxy1gctrknso39q7c4/UDPReceiver.o | Bin 0 -> 10348 bytes .../1q3nmz23eyq7mv8szac7tikov/Intake.o | Bin 0 -> 4728 bytes .../1t6w95zfw02hopzpza37pqapf/Utility.o | Bin 0 -> 10100 bytes .../2j8c7ksxu2yzswcvp2bkatkix/FlightStick.o | Bin 0 -> 2960 bytes .../3bg5a77l7vd4edmrxq5jco6ri/Robot.o | Bin 0 -> 84668 bytes .../4ipmwnvld91t21754bsvxe4fw/DriveBase.o | Bin 0 -> 12764 bytes .../9inwptvhlqwch3x6exfxgqlg3/Xbox.o | Bin 0 -> 2932 bytes .../options.txt | 55 +++ .../output.txt | 16 + .../options.txt | 54 +++ .../output.txt | 16 + .../options.txt | 40 ++ .../output.txt | 4 + .../options.txt | 40 ++ .../output.txt | 4 + Hindsight/build/vscodeconfig.json | 381 ++++++++++++++++++ Hindsight/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + Hindsight/gradlew | 234 +++++++++++ Hindsight/gradlew.bat | 89 ++++ Hindsight/settings.gradle | 27 ++ Hindsight/src/main/cpp/DriveBase.cpp | 13 + Hindsight/src/main/cpp/DriveBase.h | 34 ++ Hindsight/src/main/cpp/FlightStick.cpp | 13 + Hindsight/src/main/cpp/FlightStick.h | 27 ++ Hindsight/src/main/cpp/Input.h | 12 + Hindsight/src/main/cpp/Intake.cpp | 17 + Hindsight/src/main/cpp/Intake.h | 22 + Hindsight/src/main/cpp/Robot.cpp | 105 +++++ Hindsight/src/main/cpp/Robot.h | 84 ++++ Hindsight/src/main/cpp/UDPReceiver.cpp | 168 ++++++++ Hindsight/src/main/cpp/UDPReceiver.h | 56 +++ Hindsight/src/main/cpp/Utility.cpp | 85 ++++ Hindsight/src/main/cpp/Utility.h | 62 +++ Hindsight/src/main/cpp/Xbox.cpp | 13 + Hindsight/src/main/cpp/Xbox.h | 45 +++ Hindsight/src/main/deploy/example.txt | 4 + Hindsight/src/test/cpp/main.cpp | 10 + Hindsight/vendordeps/WPILibOldCommands.json | 37 ++ Jenkinsfile | 31 ++ README.md | 7 +- 54 files changed, 1932 insertions(+), 1 deletion(-) create mode 100644 Hindsight/WPILib-License.md create mode 100644 Hindsight/build.gradle create mode 100644 Hindsight/build/exe/frcUserProgram/debug/frcUserProgram create mode 100644 Hindsight/build/exe/frcUserProgram/debug/frcUserProgram.debug create mode 100644 Hindsight/build/exe/frcUserProgram/release/frcUserProgram create mode 100644 Hindsight/build/exe/frcUserProgram/release/frcUserProgram.debug create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/1g3eugptxy1gctrknso39q7c4/UDPReceiver.o create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/1q3nmz23eyq7mv8szac7tikov/Intake.o create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/1t6w95zfw02hopzpza37pqapf/Utility.o create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/2j8c7ksxu2yzswcvp2bkatkix/FlightStick.o create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/3bg5a77l7vd4edmrxq5jco6ri/Robot.o create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/4ipmwnvld91t21754bsvxe4fw/DriveBase.o create mode 100644 Hindsight/build/objs/frcUserProgram/debug/frcUserProgramCpp/9inwptvhlqwch3x6exfxgqlg3/Xbox.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/1g3eugptxy1gctrknso39q7c4/UDPReceiver.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/1q3nmz23eyq7mv8szac7tikov/Intake.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/1t6w95zfw02hopzpza37pqapf/Utility.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/2j8c7ksxu2yzswcvp2bkatkix/FlightStick.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/3bg5a77l7vd4edmrxq5jco6ri/Robot.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/4ipmwnvld91t21754bsvxe4fw/DriveBase.o create mode 100644 Hindsight/build/objs/frcUserProgram/release/frcUserProgramCpp/9inwptvhlqwch3x6exfxgqlg3/Xbox.o create mode 100644 Hindsight/build/tmp/compileFrcUserProgramDebugExecutableFrcUserProgramCpp/options.txt create mode 100644 Hindsight/build/tmp/compileFrcUserProgramDebugExecutableFrcUserProgramCpp/output.txt create mode 100644 Hindsight/build/tmp/compileFrcUserProgramReleaseExecutableFrcUserProgramCpp/options.txt create mode 100644 Hindsight/build/tmp/compileFrcUserProgramReleaseExecutableFrcUserProgramCpp/output.txt create mode 100644 Hindsight/build/tmp/linkFrcUserProgramDebugExecutable/options.txt create mode 100644 Hindsight/build/tmp/linkFrcUserProgramDebugExecutable/output.txt create mode 100644 Hindsight/build/tmp/linkFrcUserProgramReleaseExecutable/options.txt create mode 100644 Hindsight/build/tmp/linkFrcUserProgramReleaseExecutable/output.txt create mode 100644 Hindsight/build/vscodeconfig.json create mode 100644 Hindsight/gradle/wrapper/gradle-wrapper.jar create mode 100644 Hindsight/gradle/wrapper/gradle-wrapper.properties create mode 100644 Hindsight/gradlew create mode 100644 Hindsight/gradlew.bat create mode 100644 Hindsight/settings.gradle create mode 100644 Hindsight/src/main/cpp/DriveBase.cpp create mode 100644 Hindsight/src/main/cpp/DriveBase.h create mode 100644 Hindsight/src/main/cpp/FlightStick.cpp create mode 100644 Hindsight/src/main/cpp/FlightStick.h create mode 100644 Hindsight/src/main/cpp/Input.h create mode 100644 Hindsight/src/main/cpp/Intake.cpp create mode 100644 Hindsight/src/main/cpp/Intake.h create mode 100644 Hindsight/src/main/cpp/Robot.cpp create mode 100644 Hindsight/src/main/cpp/Robot.h create mode 100644 Hindsight/src/main/cpp/UDPReceiver.cpp create mode 100644 Hindsight/src/main/cpp/UDPReceiver.h create mode 100644 Hindsight/src/main/cpp/Utility.cpp create mode 100644 Hindsight/src/main/cpp/Utility.h create mode 100644 Hindsight/src/main/cpp/Xbox.cpp create mode 100644 Hindsight/src/main/cpp/Xbox.h create mode 100644 Hindsight/src/main/deploy/example.txt create mode 100644 Hindsight/src/test/cpp/main.cpp create mode 100644 Hindsight/vendordeps/WPILibOldCommands.json create mode 100644 Jenkinsfile diff --git a/Hindsight/WPILib-License.md b/Hindsight/WPILib-License.md new file mode 100644 index 0000000..ba35a02 --- /dev/null +++ b/Hindsight/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/Hindsight/build.gradle b/Hindsight/build.gradle new file mode 100644 index 0000000..acd35fb --- /dev/null +++ b/Hindsight/build.gradle @@ -0,0 +1,99 @@ +plugins { + id "cpp" + id "google-test-test-suite" + id "edu.wpi.first.GradleRIO" version "2022.4.1" +} + +// Define my targets (RoboRIO) and artifacts (deployable files) +// This is added by GradleRIO's backing project DeployUtils. +deploy { + targets { + roborio(getTargetTypeClass('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 = project.frc.getTeamNumber() + debug = project.frc.getDebugOrDefault(false) + + artifacts { + // First part is artifact name, 2nd is artifact type + // getTargetTypeClass is a shortcut to get the class type using a string + + frcCpp(getArtifactTypeClass('FRCNativeArtifact')) { + } + + // Static files artifact + frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) { + files = project.fileTree('src/main/deploy') + directory = '/home/lvuser/deploy' + } + } + } + } +} + +def deployArtifact = deploy.targets.roborio.artifacts.frcCpp + +// Set this to true to enable desktop support. +def includeDesktopSupport = false + +// Set to true to run simulation in debug mode +wpi.cpp.debugSimulation = false + +// Default enable simgui +wpi.sim.addGui().defaultEnabled = true +// Enable DS but not by default +wpi.sim.addDriverstation() + +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' + } + } + + // Set deploy task to deploy this component + deployArtifact.component = it + + // Enable run tasks for this component + wpi.cpp.enableExternalTasks(it) + + // Enable simulation for this component + wpi.sim.enable(it) + // Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries. + wpi.cpp.vendor.cpp(it) + wpi.cpp.deps.wpilib(it) + } + } + testSuites { + frcUserProgramTest(GoogleTestTestSuiteSpec) { + testing $.components.frcUserProgram + + sources.cpp { + source { + srcDir 'src/test/cpp' + include '**/*.cpp' + } + } + + // Enable run tasks for this component + wpi.cpp.enableExternalTasks(it) + + wpi.cpp.vendor.cpp(it) + wpi.cpp.deps.wpilib(it) + wpi.cpp.deps.googleTest(it) + } + } +} diff --git a/Hindsight/build/exe/frcUserProgram/debug/frcUserProgram b/Hindsight/build/exe/frcUserProgram/debug/frcUserProgram new file mode 100644 index 0000000000000000000000000000000000000000..f6284b1c9985b9c71b96fedddb3fe385040fb550 GIT binary patch literal 105860 zcmeFa4SZD9wfBD}nLr3p#){WSX&n@m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