Skip to content

Commit

Permalink
WONT BUILD Part 1 of Fix, still need Choreo
Browse files Browse the repository at this point in the history
  • Loading branch information
smccrorie committed Jan 7, 2025
1 parent 00bdb8f commit dde0e6d
Show file tree
Hide file tree
Showing 26 changed files with 1,301 additions and 519 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,19 @@ out/
.fleet

# Simulation GUI and other tools window save file
networktables.json
simgui.json
*-window.json

# Simulation data log directory
logs/

# Folder that has CTRE Phoenix Sim device config storage
ctre_sim/

# clangd
/.cache
compile_commands.json

# Eclipse generated file for annotation processors
.factorypath
32 changes: 31 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,35 @@
},
],
"java.test.defaultConfig": "WPIlibUnitTests",
"java.debug.settings.onBuildFailureProceed": true
"java.import.gradle.annotationProcessing.enabled": false,
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*",
"edu.wpi.first.units.Units.*"
],
"java.completion.filteredTypes": [
"java.awt.*",
"com.sun.*",
"sun.*",
"jdk.*",
"org.graalvm.*",
"io.micrometer.shaded.*",
"java.beans.*",
"java.util.Base64.*",
"java.util.Timer",
"java.sql.*",
"javax.swing.*",
"javax.management.*",
"javax.smartcardio.*",
"edu.wpi.first.math.proto.*",
"edu.wpi.first.math.**.proto.*",
"edu.wpi.first.math.**.struct.*",
]
}
2 changes: 1 addition & 1 deletion .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2024",
"projectYear": "2025",
"teamNumber": 111
}
2 changes: 1 addition & 1 deletion WPILib-License.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2023 FIRST and other WPILib contributors
Copyright (c) 2009-2024 FIRST and other WPILib contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
13 changes: 4 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2024.3.2"
id "edu.wpi.first.GradleRIO" version "2025.1.1"
}

java {
Expand Down Expand Up @@ -33,20 +33,14 @@ deploy {
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
files = project.fileTree('src/main/deploy')
directory = '/home/lvuser/deploy'
deleteOldFiles = false // Change to true to delete files on roboRIO that no
// longer exist in deploy directory of this project
}
}
}
}
}

// build docs in /docs folder, don't build for sample
javadoc {
destinationDir = file("docs")
include 'org/wildstang/framework/**'
include 'org/wildstang/hardware/**'
include 'org/wildstang/sample/robot/**'
}

def deployArtifact = deploy.targets.roborio.artifacts.frcJava

// Set to true to use debug for JNI.
Expand All @@ -58,6 +52,7 @@ def includeDesktopSupport = false
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 5.
dependencies {
annotationProcessor wpi.java.deps.wpilibAnnotations()
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

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.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

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.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
String frcYear = '2024'
String frcYear = '2025'
File frcHome
if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

import com.choreo.lib.*;
import choreo.*;
import choreo.trajectory.Trajectory;

import com.google.gson.Gson;

public class SwervePathFollowerStep extends AutoStep {

private static final double mToIn = 39.3701;
private SwerveDriveTemplate m_drive;
private ChoreoTrajectory pathtraj;
private Trajectory pathTraj;

// x and y field relative
private Pose2d fieldAutoPose, fieldRobotPose;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.wildstang.hardware.roborio.outputs.WsDigitalOutput;
import org.wildstang.hardware.roborio.outputs.WsDoubleSolenoid;
import org.wildstang.hardware.roborio.outputs.WsI2COutput;
import org.wildstang.hardware.roborio.outputs.WsPhoenix;
// import org.wildstang.hardware.roborio.outputs.WsPhoenix;
import org.wildstang.hardware.roborio.outputs.WsRelay;
import org.wildstang.hardware.roborio.outputs.WsServo;
import org.wildstang.hardware.roborio.outputs.WsSolenoid;
Expand Down Expand Up @@ -66,19 +66,19 @@ else if (config instanceof WsRelayConfig) {
WsRelayConfig c = (WsRelayConfig) config;
out = new WsRelay(p_output.getName(), c.getChannel());
}
else if (config instanceof WsPhoenixConfig) {
WsPhoenixConfig c = (WsPhoenixConfig) config;
out = new WsPhoenix(p_output.getName(), c.getChannel(), c.getDefault(),
c.getType(), c.isInverted());
}
// else if (config instanceof WsPhoenixConfig) {
// WsPhoenixConfig c = (WsPhoenixConfig) config;
// out = new WsPhoenix(p_output.getName(), c.getChannel(), c.getDefault(),
// c.getType(), c.isInverted());
// }
// Note a WsPhoenixFollower must be defined after its corresponding WsPhoenix
else if (config instanceof WsPhoenixFollowerConfig) {
WsPhoenixFollowerConfig c = (WsPhoenixFollowerConfig) config;
// Returns the follwed WsPhoenix because a return is required
// and duplicate outputs are thrown out when encountered.
out = Core.getOutputManager().getOutput(c.getFollowing());
((WsPhoenix) out).addFollower(c.getChannel(), c.getType(), c.isOpposing());
}
// else if (config instanceof WsPhoenixFollowerConfig) {
// WsPhoenixFollowerConfig c = (WsPhoenixFollowerConfig) config;
// // Returns the follwed WsPhoenix because a return is required
// // and duplicate outputs are thrown out when encountered.
// out = Core.getOutputManager().getOutput(c.getFollowing());
// ((WsPhoenix) out).addFollower(c.getChannel(), c.getType(), c.isOpposing());
// }
else if (config instanceof WsSparkConfig) {
WsSparkConfig c = (WsSparkConfig) config;
out = new WsSpark(p_output.getName(), c.getChannel(), c.getType(), c.getDefault(), c.isInverted());
Expand Down
Loading

0 comments on commit dde0e6d

Please sign in to comment.