Update to 2025, Add names for StatusCodes, and fix error error

This commit is contained in:
Michael Mikovsky
2025-01-04 14:20:50 -07:00
parent b7c16b5ca4
commit a014110f06
31 changed files with 750 additions and 863 deletions
-2
View File
@@ -1,2 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto
-23
View File
@@ -1,23 +0,0 @@
name: Java CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
+187 -180
View File
@@ -1,180 +1,187 @@
# This gitignore has been specially created by the WPILib team. # This gitignore has been specially created by the WPILib team.
# If you remove items from this file, intellisense might break. # If you remove items from this file, intellisense might break.
### C++ ### ### C++ ###
# Prerequisites # Prerequisites
*.d *.d
# Compiled Object files # Compiled Object files
*.slo *.slo
*.lo *.lo
*.o *.o
*.obj *.obj
# Precompiled Headers # Precompiled Headers
*.gch *.gch
*.pch *.pch
# Compiled Dynamic libraries # Compiled Dynamic libraries
*.so *.so
*.dylib *.dylib
*.dll *.dll
# Fortran module files # Fortran module files
*.mod *.mod
*.smod *.smod
# Compiled Static libraries # Compiled Static libraries
*.lai *.lai
*.la *.la
*.a *.a
*.lib *.lib
# Executables # Executables
*.exe *.exe
*.out *.out
*.app *.app
### Java ### ### Java ###
# Compiled class file # Compiled class file
*.class *.class
# Log file # Log file
*.log *.log
# BlueJ files # BlueJ files
*.ctxt *.ctxt
# Mobile Tools for Java (J2ME) # Mobile Tools for Java (J2ME)
.mtj.tmp/ .mtj.tmp/
# Package Files # # Package Files #
*.jar *.jar
*.war *.war
*.nar *.nar
*.ear *.ear
*.zip *.zip
*.tar.gz *.tar.gz
*.rar *.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid* hs_err_pid*
### Linux ### ### Linux ###
*~ *~
# temporary files which can be created if a process still has a handle open of a deleted file # temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden* .fuse_hidden*
# KDE directory preferences # KDE directory preferences
.directory .directory
# Linux trash folder which might appear on any partition or disk # Linux trash folder which might appear on any partition or disk
.Trash-* .Trash-*
# .nfs files are created when an open file is removed but is still being accessed # .nfs files are created when an open file is removed but is still being accessed
.nfs* .nfs*
### macOS ### ### macOS ###
# General # General
.DS_Store .DS_Store
.AppleDouble .AppleDouble
.LSOverride .LSOverride
# Icon must end with two \r # Icon must end with two \r
Icon Icon
# Thumbnails # Thumbnails
._* ._*
# Files that might appear in the root of a volume # Files that might appear in the root of a volume
.DocumentRevisions-V100 .DocumentRevisions-V100
.fseventsd .fseventsd
.Spotlight-V100 .Spotlight-V100
.TemporaryItems .TemporaryItems
.Trashes .Trashes
.VolumeIcon.icns .VolumeIcon.icns
.com.apple.timemachine.donotpresent .com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share # Directories potentially created on remote AFP share
.AppleDB .AppleDB
.AppleDesktop .AppleDesktop
Network Trash Folder Network Trash Folder
Temporary Items Temporary Items
.apdisk .apdisk
### VisualStudioCode ### ### VisualStudioCode ###
.vscode/* .vscode/*
!.vscode/settings.json !.vscode/settings.json
!.vscode/tasks.json !.vscode/tasks.json
!.vscode/launch.json !.vscode/launch.json
!.vscode/extensions.json !.vscode/extensions.json
### Windows ### ### Windows ###
# Windows thumbnail cache files # Windows thumbnail cache files
Thumbs.db Thumbs.db
ehthumbs.db ehthumbs.db
ehthumbs_vista.db ehthumbs_vista.db
# Dump file # Dump file
*.stackdump *.stackdump
# Folder config file # Folder config file
[Dd]esktop.ini [Dd]esktop.ini
# Recycle Bin used on file shares # Recycle Bin used on file shares
$RECYCLE.BIN/ $RECYCLE.BIN/
# Windows Installer files # Windows Installer files
*.cab *.cab
*.msi *.msi
*.msix *.msix
*.msm *.msm
*.msp *.msp
# Windows shortcuts # Windows shortcuts
*.lnk *.lnk
### Gradle ### ### Gradle ###
.gradle .gradle
/build/ /build/
# Ignore Gradle GUI config # Ignore Gradle GUI config
gradle-app.setting gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar !gradle-wrapper.jar
# Cache of project # Cache of project
.gradletasknamecache .gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties # gradle/wrapper/gradle-wrapper.properties
# # VS Code Specific Java Settings # # VS Code Specific Java Settings
# DO NOT REMOVE .classpath and .project # DO NOT REMOVE .classpath and .project
.classpath .classpath
.project .project
.settings/ .settings/
bin/ bin/
# IntelliJ # IntelliJ
*.iml *.iml
*.ipr *.ipr
*.iws *.iws
.idea/ .idea/
out/ out/
# Fleet # Fleet
.fleet .fleet
# Simulation GUI and other tools window save file # Simulation GUI and other tools window save file
*-window.json networktables.json
simgui.json
# Simulation data log directory *-window.json
logs/
# Simulation data log directory
# Folder that has CTRE Phoenix Sim device config storage logs/
ctre_sim/
simgui.json # Folder that has CTRE Phoenix Sim device config storage
simgui-ds.json ctre_sim/
# clangd
/.cache
compile_commands.json
# Eclipse generated file for annotation processors
.factorypath
-3
View File
@@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="temurin-11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
</project>
Generated
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
-40
View File
@@ -1,40 +0,0 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc4388.robot.commands;
import edu.wpi.first.wpilibj2.command.*;
import frc4388.robot.subsystems.*;
import org.junit.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
public class CommandTest {
private CommandScheduler scheduler = null;
@Before
public void setup() {
scheduler = CommandScheduler.getInstance();
}
// TODO: Update this to use an actual command. Won't work with inline commands for some reason
@Test
public void testExample() {
// Arrange
Drive drive = mock(Drive.class);
RunCommand command = new RunCommand(() -> drive.driveWithInput(0, 0), drive);
// Act
scheduler.schedule(command);
scheduler.run();
// Assert
verify(drive).driveWithInput(0, 0);
}
}
-59
View File
@@ -1,59 +0,0 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc4388.robot.subsystems;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import org.junit.*;
import edu.wpi.first.wpilibj.Spark;
import frc4388.robot.Constants.LEDConstants;
import frc4388.utility.LEDPatterns;
/**
* Based off the LEDSubsystemTest class
*/
public class SubsystemTest {
@Test
public void testConstructor() {
// Arrange
Spark ledController = mock(Spark.class);
// Act
LED led = new LED(ledController);
// Assert
assertEquals(LEDConstants.DEFAULT_PATTERN.getValue(), led.getPattern().getValue(), 0.0001);
}
@Test
public void testPatterns() {
// Arrange
Spark ledController = mock(Spark.class);
LED led = new LED(ledController);
// Act
led.setPattern(LEDPatterns.RAINBOW_RAINBOW);
// Assert
assertEquals(LEDPatterns.RAINBOW_RAINBOW.getValue(), led.getPattern().getValue(), 0.0001);
// Act
led.setPattern(LEDPatterns.BLUE_BREATH);
// Assert
assertEquals(LEDPatterns.BLUE_BREATH.getValue(), led.getPattern().getValue(), 0.0001);
// Act
led.setPattern(LEDPatterns.SOLID_BLACK);
// Assert
assertEquals(LEDPatterns.SOLID_BLACK.getValue(), led.getPattern().getValue(), 0.0001);
}
}
-61
View File
@@ -1,61 +0,0 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc4388.utility;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import com.kauailabs.navx.frc.AHRS;
import org.junit.*;
import frc4388.mocks.MockPigeonIMU;
import frc4388.robot.Constants.DriveConstants;
/**
* Based on the RobotGyroUtilityTest class
*/
public class UtilityTest {
private RobotGyro gyroPigeon;
private RobotGyro gyroNavX;
@Test
public void testConstructor() {
// Arrange
MockPigeonIMU pigeon = new MockPigeonIMU(DriveConstants.DRIVE_PIGEON_ID);
AHRS navX = mock(AHRS.class);
gyroPigeon = new RobotGyro(pigeon);
gyroNavX = new RobotGyro(navX);
// Assert
assertEquals(true, gyroPigeon.m_isGyroAPigeon);
assertEquals(pigeon, gyroPigeon.getPigeon());
assertEquals(null, gyroPigeon.getNavX());
assertEquals(false, gyroNavX.m_isGyroAPigeon);
assertEquals(navX, gyroNavX.getNavX());
assertEquals(null, gyroNavX.getPigeon());
}
@Test
public void testHeadingPigeon() {
// Arrange
MockPigeonIMU pigeon = new MockPigeonIMU(DriveConstants.DRIVE_PIGEON_ID);
gyroPigeon = new RobotGyro(pigeon);
// Act & Assert
assertEquals(-90, gyroPigeon.getHeading(270), 0.0001);
assertEquals(-45, gyroPigeon.getHeading(315), 0.0001);
assertEquals(-60, gyroPigeon.getHeading(-60), 0.0001);
assertEquals(30, gyroPigeon.getHeading(30), 0.0001);
assertEquals(0, gyroPigeon.getHeading(0), 0.0001);
assertEquals(180, gyroPigeon.getHeading(180), 0.0001);
assertEquals(-180, gyroPigeon.getHeading(-180), 0.0001);
assertEquals(97, gyroPigeon.getHeading(1537), 0.0001);
assertEquals(99, gyroPigeon.getHeading(-2781), 0.0001);
}
}
+21 -21
View File
@@ -1,21 +1,21 @@
{ {
// Use IntelliSense to learn about possible attributes. // Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes. // Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"type": "wpilib", "type": "wpilib",
"name": "WPILib Desktop Debug", "name": "WPILib Desktop Debug",
"request": "launch", "request": "launch",
"desktop": true, "desktop": true,
}, },
{ {
"type": "wpilib", "type": "wpilib",
"name": "WPILib roboRIO Debug", "name": "WPILib roboRIO Debug",
"request": "launch", "request": "launch",
"desktop": false, "desktop": false,
} }
] ]
} }
+60 -29
View File
@@ -1,29 +1,60 @@
{ {
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.server.launchMode": "Standard", "java.server.launchMode": "Standard",
"files.exclude": { "files.exclude": {
"**/.git": true, "**/.git": true,
"**/.svn": true, "**/.svn": true,
"**/.hg": true, "**/.hg": true,
"**/CVS": true, "**/CVS": true,
"**/.DS_Store": true, "**/.DS_Store": true,
"bin/": true, "bin/": true,
"**/.classpath": true, "**/.classpath": true,
"**/.project": true, "**/.project": true,
"**/.settings": true, "**/.settings": true,
"**/.factorypath": true, "**/.factorypath": true,
"**/*~": true "**/*~": true
}, },
"java.test.config": [ "java.test.config": [
{ {
"name": "WPIlibUnitTests", "name": "WPIlibUnitTests",
"workingDirectory": "${workspaceFolder}/build/jni/release", "workingDirectory": "${workspaceFolder}/build/jni/release",
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ], "vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
"env": { "env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" , "LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" "DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
} }
}, },
], ],
"java.test.defaultConfig": "WPIlibUnitTests" "java.test.defaultConfig": "WPIlibUnitTests",
} "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.*",
]
}
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"enableCppIntellisense": false, "enableCppIntellisense": false,
"currentLanguage": "java", "currentLanguage": "java",
"projectYear": "2024", "projectYear": "2025",
"teamNumber": 4388 "teamNumber": 4388
} }
-24
View File
@@ -1,24 +0,0 @@
Copyright (c) 2009-2024 FIRST
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 the FIRST nor the
names of its 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 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.
-2
View File
@@ -1,2 +0,0 @@
# Robot-Essentials
Basic code for any Ridgebotics robot project
+24 -24
View File
@@ -1,24 +1,24 @@
Copyright (c) 2009-2023 FIRST and other WPILib contributors Copyright (c) 2009-2024 FIRST and other WPILib contributors
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
* Neither the name of FIRST, WPILib, nor the names of other WPILib * Neither the name of FIRST, WPILib, nor the names of other WPILib
contributors may be used to endorse or promote products derived from contributors may be used to endorse or promote products derived from
this software without specific prior written permission. this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND 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 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 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 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+104 -101
View File
@@ -1,101 +1,104 @@
plugins { plugins {
id "java" id "java"
id "edu.wpi.first.GradleRIO" version "2024.3.2" id "edu.wpi.first.GradleRIO" version "2025.1.1"
} }
java { java {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
def ROBOT_MAIN_CLASS = "frc4388.robot.Main" def ROBOT_MAIN_CLASS = "frc4388.robot.Main"
// Define my targets (RoboRIO) and artifacts (deployable files) // Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils. // This is added by GradleRIO's backing project DeployUtils.
deploy { deploy {
targets { targets {
roborio(getTargetTypeClass('RoboRIO')) { roborio(getTargetTypeClass('RoboRIO')) {
// Team number is loaded either from the .wpilib/wpilib_preferences.json // Team number is loaded either from the .wpilib/wpilib_preferences.json
// or from command line. If not found an exception will be thrown. // or from command line. If not found an exception will be thrown.
// You can use getTeamOrDefault(team) instead of getTeamNumber if you // You can use getTeamOrDefault(team) instead of getTeamNumber if you
// want to store a team number in this file. // want to store a team number in this file.
team = project.frc.getTeamNumber() team = project.frc.getTeamNumber()
debug = project.frc.getDebugOrDefault(false) debug = project.frc.getDebugOrDefault(false)
artifacts { artifacts {
// First part is artifact name, 2nd is artifact type // First part is artifact name, 2nd is artifact type
// getTargetTypeClass is a shortcut to get the class type using a string // getTargetTypeClass is a shortcut to get the class type using a string
frcJava(getArtifactTypeClass('FRCJavaArtifact')) { frcJava(getArtifactTypeClass('FRCJavaArtifact')) {
} }
// Static files artifact // Static files artifact
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) { frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
files = project.fileTree('src/main/deploy') files = project.fileTree('src/main/deploy')
directory = '/home/lvuser/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
} }
} }
} }
}
def deployArtifact = deploy.targets.roborio.artifacts.frcJava }
// Set to true to use debug for JNI. def deployArtifact = deploy.targets.roborio.artifacts.frcJava
wpi.java.debugJni = false
// Set to true to use debug for JNI.
// Set this to true to enable desktop support. wpi.java.debugJni = false
def includeDesktopSupport = false
// Set this to true to enable desktop support.
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries. def includeDesktopSupport = false
// Also defines JUnit 5.
dependencies { // Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
implementation wpi.java.deps.wpilib() // Also defines JUnit 5.
implementation wpi.java.vendor.java() dependencies {
annotationProcessor wpi.java.deps.wpilibAnnotations()
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio) implementation wpi.java.deps.wpilib()
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio) implementation wpi.java.vendor.java()
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio) roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio) roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop) roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop) roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
simulationDebug wpi.sim.enableDebug()
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop) nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop) simulationDebug wpi.sim.enableDebug()
simulationRelease wpi.sim.enableRelease()
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop)
//testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1' nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
//testRuntimeOnly 'org.junit.platform:junit-platform-launcher' simulationRelease wpi.sim.enableRelease()
}
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
// test { testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// useJUnitPlatform() }
// systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
//} test {
useJUnitPlatform()
// Simulation configuration (e.g. environment variables). systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
wpi.sim.addGui().defaultEnabled = true }
wpi.sim.addDriverstation()
// Simulation configuration (e.g. environment variables).
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar') wpi.sim.addGui().defaultEnabled = true
// in order to make them all available at runtime. Also adding the manifest so WPILib wpi.sim.addDriverstation()
// knows where to look for our Robot Class.
jar { // Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } // in order to make them all available at runtime. Also adding the manifest so WPILib
from sourceSets.main.allSource // knows where to look for our Robot Class.
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS) jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
} from sourceSets.main.allSource
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
// Configure jar and deploy tasks duplicatesStrategy = DuplicatesStrategy.INCLUDE
deployArtifact.jarTask = jar }
wpi.java.configureExecutableTasks(jar)
wpi.java.configureTestTasks(test) // Configure jar and deploy tasks
deployArtifact.jarTask = jar
// Configure string concat to always inline compile wpi.java.configureExecutableTasks(jar)
tasks.withType(JavaCompile) { wpi.java.configureTestTasks(test)
options.compilerArgs.add '-XDstringConcat=inline'
} // Configure string concat to always inline compile
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}
Binary file not shown.
+7 -7
View File
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists 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 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=permwrapper/dists zipStorePath=permwrapper/dists
Vendored
+5 -2
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (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. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # 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. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
Vendored
+94 -92
View File
@@ -1,92 +1,94 @@
@rem @rem
@rem Copyright 2015 the original author or authors. @rem Copyright 2015 the original author or authors.
@rem @rem
@rem Licensed under the Apache License, Version 2.0 (the "License"); @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 not use this file except in compliance with the License.
@rem You may obtain a copy of the License at @rem You may obtain a copy of the License at
@rem @rem
@rem https://www.apache.org/licenses/LICENSE-2.0 @rem https://www.apache.org/licenses/LICENSE-2.0
@rem @rem
@rem Unless required by applicable law or agreed to in writing, software @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 distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@if "%DEBUG%"=="" @echo off @rem
@rem ##########################################################################
@rem @if "%DEBUG%"=="" @echo off
@rem Gradle startup script for Windows @rem ##########################################################################
@rem @rem
@rem ########################################################################## @rem Gradle startup script for Windows
@rem
@rem Set local scope for the variables with windows NT shell @rem ##########################################################################
if "%OS%"=="Windows_NT" setlocal
@rem Set local scope for the variables with windows NT shell
set DIRNAME=%~dp0 if "%OS%"=="Windows_NT" setlocal
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused set DIRNAME=%~dp0
set APP_BASE_NAME=%~n0 if "%DIRNAME%"=="" set DIRNAME=.
set APP_HOME=%DIRNAME% @rem This is normally unused
set APP_BASE_NAME=%~n0
@rem Resolve any "." and ".." in APP_HOME to make it shorter. set APP_HOME=%DIRNAME%
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
@rem Find java.exe set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
if defined JAVA_HOME goto findJavaFromJavaHome
@rem Find java.exe
set JAVA_EXE=java.exe if defined JAVA_HOME goto findJavaFromJavaHome
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
echo. if %ERRORLEVEL% equ 0 goto execute
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo location of your Java installation. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
goto fail echo location of your Java installation. 1>&2
:findJavaFromJavaHome goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
if exist "%JAVA_EXE%" goto execute set JAVA_EXE=%JAVA_HOME%/bin/java.exe
echo. if exist "%JAVA_EXE%" goto execute
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo location of your Java installation. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
goto fail echo location of your Java installation. 1>&2
:execute goto fail
@rem Setup the command line
:execute
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @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 %*
@rem Execute Gradle
:end "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd :end
@rem End local scope for the variables with windows NT shell
:fail if %ERRORLEVEL% equ 0 goto mainEnd
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! :fail
set EXIT_CODE=%ERRORLEVEL% rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
if %EXIT_CODE% equ 0 set EXIT_CODE=1 rem the _cmd.exe /c_ return code!
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% set EXIT_CODE=%ERRORLEVEL%
exit /b %EXIT_CODE% if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
:mainEnd exit /b %EXIT_CODE%
if "%OS%"=="Windows_NT" endlocal
:mainEnd
:omega if "%OS%"=="Windows_NT" endlocal
:omega
+30 -30
View File
@@ -1,30 +1,30 @@
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
pluginManagement { pluginManagement {
repositories { repositories {
mavenLocal() mavenLocal()
gradlePluginPortal() gradlePluginPortal()
String frcYear = '2024' String frcYear = '2025'
File frcHome File frcHome
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC') String publicFolder = System.getenv('PUBLIC')
if (publicFolder == null) { if (publicFolder == null) {
publicFolder = "C:\\Users\\Public" publicFolder = "C:\\Users\\Public"
} }
def homeRoot = new File(publicFolder, "wpilib") def homeRoot = new File(publicFolder, "wpilib")
frcHome = new File(homeRoot, frcYear) frcHome = new File(homeRoot, frcYear)
} else { } else {
def userFolder = System.getProperty("user.home") def userFolder = System.getProperty("user.home")
def homeRoot = new File(userFolder, "wpilib") def homeRoot = new File(userFolder, "wpilib")
frcHome = new File(homeRoot, frcYear) frcHome = new File(homeRoot, frcYear)
} }
def frcHomeMaven = new File(frcHome, 'maven') def frcHomeMaven = new File(frcHome, 'maven')
maven { maven {
name 'frcHome' name 'frcHome'
url frcHomeMaven url frcHomeMaven
} }
} }
} }
Properties props = System.getProperties(); Properties props = System.getProperties();
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true"); props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
+92
View File
@@ -0,0 +1,92 @@
{
"keyboardJoysticks": [
{
"axisConfig": [
{
"decKey": 65,
"incKey": 68
},
{
"decKey": 87,
"incKey": 83
},
{
"decKey": 69,
"decayRate": 0.0,
"incKey": 82,
"keyRate": 0.009999999776482582
}
],
"axisCount": 3,
"buttonCount": 4,
"buttonKeys": [
90,
88,
67,
86
],
"povConfig": [
{
"key0": 328,
"key135": 323,
"key180": 322,
"key225": 321,
"key270": 324,
"key315": 327,
"key45": 329,
"key90": 326
}
],
"povCount": 1
},
{
"axisConfig": [
{
"decKey": 74,
"incKey": 76
},
{
"decKey": 73,
"incKey": 75
}
],
"axisCount": 2,
"buttonCount": 4,
"buttonKeys": [
77,
44,
46,
47
],
"povCount": 0
},
{
"axisConfig": [
{
"decKey": 263,
"incKey": 262
},
{
"decKey": 265,
"incKey": 264
}
],
"axisCount": 2,
"buttonCount": 6,
"buttonKeys": [
260,
268,
266,
261,
269,
267
],
"povCount": 0
},
{
"axisCount": 0,
"buttonCount": 0,
"povCount": 0
}
]
}
+1 -1
View File
@@ -199,7 +199,7 @@ public class Robot extends TimedRobot {
// Errors header // Errors header
System.out.println(new String(Base64.getDecoder().decode("4paX4paE4paE4paE4paW4paX4paE4paE4paWIOKWl+KWhOKWhOKWliAg4paX4paE4paWIOKWl+KWhOKWhOKWliAg4paX4paE4paE4paWCuKWkOKWjCAgIOKWkOKWjCDilpDilozilpDilowg4paQ4paM4paQ4paMIOKWkOKWjOKWkOKWjCDilpDilozilpDilowgICAK4paQ4pab4paA4paA4paY4paQ4pab4paA4paa4paW4paQ4pab4paA4paa4paW4paQ4paMIOKWkOKWjOKWkOKWm+KWgOKWmuKWliDilp3iloDilprilpYK4paQ4paZ4paE4paE4paW4paQ4paMIOKWkOKWjOKWkOKWjCDilpDilozilp3ilpriloTilp7ilpjilpDilowg4paQ4paM4paX4paE4paE4pae4paY"))); System.out.println(new String(Base64.getDecoder().decode("4paX4paE4paE4paE4paW4paX4paE4paE4paWIOKWl+KWhOKWhOKWliAg4paX4paE4paWIOKWl+KWhOKWhOKWliAg4paX4paE4paE4paWCuKWkOKWjCAgIOKWkOKWjCDilpDilozilpDilowg4paQ4paM4paQ4paMIOKWkOKWjOKWkOKWjCDilpDilozilpDilowgICAK4paQ4pab4paA4paA4paY4paQ4pab4paA4paa4paW4paQ4pab4paA4paa4paW4paQ4paMIOKWkOKWjOKWkOKWm+KWgOKWmuKWliDilp3iloDilprilpYK4paQ4paZ4paE4paE4paW4paQ4paMIOKWkOKWjOKWkOKWjCDilpDilozilp3ilpriloTilp7ilpjilpDilowg4paQ4paM4paX4paE4paE4pae4paY")));
for(int i=0;i<errors.size(); i++){ for(int i=0;i<errors.size(); i++){
System.out.println(errors.get(0)); System.out.println(errors.get(i));
} }
} }
@@ -159,7 +159,7 @@ public class SwerveModule extends Subsystem {
public Rotation2d getAngle() { public Rotation2d getAngle() {
// * Note: This assumes that the CANCoders are setup with the default feedback coefficient and the sensor value reports degrees. // * Note: This assumes that the CANCoders are setup with the default feedback coefficient and the sensor value reports degrees.
// return Rotation2d.fromDegrees(encoder.getAbsolutePosition()); // return Rotation2d.fromDegrees(encoder.getAbsolutePosition());
return Rotation2d.fromRotations(encoder.getPosition().getValue()); return Rotation2d.fromRotations(encoder.getPosition().getValue().baseUnitMagnitude());
} }
public double getAngularVel() { public double getAngularVel() {
@@ -193,8 +193,8 @@ public class SwerveModule extends Subsystem {
*/ */
public SwerveModuleState getState() { public SwerveModuleState getState() {
return new SwerveModuleState( return new SwerveModuleState(
Units.inchesToMeters(driveMotor.getVelocity().getValue() * Units.inchesToMeters(driveMotor.getVelocity().getValue().baseUnitMagnitude() *
SwerveDriveConstants.Conversions.INCHES_PER_WHEEL_REV * SwerveDriveConstants.Conversions.INCHES_PER_WHEEL_REV *
SwerveDriveConstants.Conversions.WHEEL_REV_PER_MOTOR_REV), SwerveDriveConstants.Conversions.WHEEL_REV_PER_MOTOR_REV),
getAngle() getAngle()
); );
+10 -4
View File
@@ -39,6 +39,10 @@ public class Status {
this.reports.add(r); this.reports.add(r);
} }
private String printStatusCode(StatusCode status){
return status.getName() + " (" + status.value + ")";
}
public void diagnoseHardwareCTRE(String deviceName, TalonFX motor) { public void diagnoseHardwareCTRE(String deviceName, TalonFX motor) {
if (motor.isAlive()) addReport(ReportLevel.INFO, deviceName + " Motor (TalonFX) Alive?: Alive."); if (motor.isAlive()) addReport(ReportLevel.INFO, deviceName + " Motor (TalonFX) Alive?: Alive.");
else addReport(ReportLevel.ERROR, deviceName + " Motor (TalonFX) Alive?: Dead!"); else addReport(ReportLevel.ERROR, deviceName + " Motor (TalonFX) Alive?: Dead!");
@@ -49,8 +53,10 @@ public class Status {
// If its not zero, that means that most likely that it had some communication error, I.e. It actually is powered off or not connected at all. // If its not zero, that means that most likely that it had some communication error, I.e. It actually is powered off or not connected at all.
// TODO: validate that a CANCoder can actually do `EmptyControl`s // TODO: validate that a CANCoder can actually do `EmptyControl`s
StatusCode status = coder.setControl(new EmptyControl()); StatusCode status = coder.setControl(new EmptyControl());
if (status.value == 0) addReport(ReportLevel.INFO, deviceName + " Cancoder Alive?: Alive."); if (status.value == 0) addReport(ReportLevel.INFO, deviceName + " Cancoder Alive?: Alive. " + printStatusCode(status));
else addReport(ReportLevel.ERROR, deviceName + " Cancoder Alive?: Dead!"); else addReport(ReportLevel.ERROR, deviceName + " Cancoder Alive?: Dead! " + printStatusCode(status));
// StatusSignal<MagnetHealthValue> -> MagnetHealthValue -> int // StatusSignal<MagnetHealthValue> -> MagnetHealthValue -> int
int coderMagHealth = coder.getMagnetHealth().getValue().value; int coderMagHealth = coder.getMagnetHealth().getValue().value;
@@ -65,8 +71,8 @@ public class Status {
// If its not zero, that means that most likely that it had some communication error, I.e. It actually is powered off or not connected at all. // If its not zero, that means that most likely that it had some communication error, I.e. It actually is powered off or not connected at all.
// TODO: validate that a Pigeon2 can actually do `EmptyControl`s // TODO: validate that a Pigeon2 can actually do `EmptyControl`s
StatusCode status = pigeon.setControl(new EmptyControl()); StatusCode status = pigeon.setControl(new EmptyControl());
if (status.value == 0) addReport(ReportLevel.INFO, deviceName + " Pigeon2 Alive?: Alive."); if (status.value == 0) addReport(ReportLevel.INFO, deviceName + " Pigeon2 Alive?: Alive. " + printStatusCode(status));
else addReport(ReportLevel.ERROR, deviceName + " Pigeon2 Alive?: Dead!"); else addReport(ReportLevel.ERROR, deviceName + " Pigeon2 Alive?: Dead! " + printStatusCode(status));
} }
public boolean hasReport() { public boolean hasReport() {
-31
View File
@@ -1,31 +0,0 @@
/**
* This file is a configuration file generated by the `Template` extension on `vscode`
* @see https://marketplace.visualstudio.com/items?itemName=yongwoo.template
*/
module.exports = {
// You can change the template path to another path
templateRootPath: "./.templates",
// After copying the template file the `replaceFileTextFn` function is executed
replaceFileTextFn: (fileText, templateName, utils) => {
// @see https://www.npmjs.com/package/change-case
const { changeCase } = utils;
// You can change the text in the file
return fileText
.replace(/__templateName__/gm, templateName)
.replace(
/__templateNameToPascalCase__/gm,
changeCase.pascalCase(templateName)
)
.replace(
/__templateNameToParamCase__/gm,
changeCase.paramCase(templateName)
);
},
replaceFileNameFn: (fileName, templateName, utils) => {
const { path } = utils;
// @see https://nodejs.org/api/path.html#path_path_parse_path
const { base } = path.parse(fileName);
// You can change the file name
return base;
}
};
+2 -2
View File
@@ -3,7 +3,7 @@
"name": "NavX", "name": "NavX",
"version": "2024.1.0", "version": "2024.1.0",
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", "uuid": "cb311d09-36e9-4143-a032-55bb2b94443b",
"frcYear": "2024", "frcYear": "2025",
"mavenUrls": [ "mavenUrls": [
"https://dev.studica.com/maven/release/2024/" "https://dev.studica.com/maven/release/2024/"
], ],
@@ -37,4 +37,4 @@
] ]
} }
] ]
} }
@@ -1,50 +1,80 @@
{ {
"fileName": "Phoenix6.json", "fileName": "Phoenix6-25.1.0.json",
"name": "CTRE-Phoenix (v6)", "name": "CTRE-Phoenix (v6)",
"version": "24.3.0", "version": "25.1.0",
"frcYear": 2024, "frcYear": "2025",
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19", "uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
"mavenUrls": [ "mavenUrls": [
"https://maven.ctr-electronics.com/release/" "https://maven.ctr-electronics.com/release/"
], ],
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2024-latest.json", "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-latest.json",
"conflictsWith": [ "conflictsWith": [
{ {
"uuid": "3fcf3402-e646-4fa6-971e-18afe8173b1a", "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af",
"errorMessage": "The combined Phoenix-6-And-5 vendordep is no longer supported. Please remove the vendordep and instead add both the latest Phoenix 6 vendordep and Phoenix 5 vendordep.", "errorMessage": "Users can not have both the replay and regular Phoenix 6 vendordeps in their robot program.",
"offlineFileName": "Phoenix6And5.json" "offlineFileName": "Phoenix6-replay-frc2025-latest.json"
} }
], ],
"javaDependencies": [ "javaDependencies": [
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-java", "artifactId": "wpiapi-java",
"version": "24.3.0" "version": "25.1.0"
} }
], ],
"jniDependencies": [ "jniDependencies": [
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "tools", "artifactId": "api-cpp",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"linuxathena"
],
"simMode": "hwsim"
},
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
"version": "25.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
"windowsx86-64",
"linuxx86-64",
"linuxarm64",
"linuxathena" "linuxathena"
], ],
"simMode": "hwsim" "simMode": "hwsim"
}, },
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim", "artifactId": "api-cpp-sim",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal"
],
"simMode": "swsim"
},
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
"version": "25.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
"windowsx86-64",
"linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -52,25 +82,13 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX", "artifactId": "simTalonSRX",
"version": "24.3.0", "version": "25.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
"windowsx86-64",
"linuxx86-64",
"osxuniversal"
],
"simMode": "swsim"
},
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonFX",
"version": "24.3.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -78,12 +96,13 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX", "artifactId": "simVictorSPX",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -91,12 +110,13 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU", "artifactId": "simPigeonIMU",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -104,12 +124,13 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simCANCoder", "artifactId": "simCANCoder",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -117,12 +138,13 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX", "artifactId": "simProTalonFX",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -130,12 +152,13 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder", "artifactId": "simProCANcoder",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -143,12 +166,27 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2", "artifactId": "simProPigeon2",
"version": "24.3.0", "version": "25.1.0",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal"
],
"simMode": "swsim"
},
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange",
"version": "25.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
"windowsx86-64",
"linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -158,7 +196,7 @@
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-cpp", "artifactId": "wpiapi-cpp",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_Phoenix6_WPI", "libName": "CTRE_Phoenix6_WPI",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -166,6 +204,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"linuxathena" "linuxathena"
], ],
"simMode": "hwsim" "simMode": "hwsim"
@@ -173,7 +212,7 @@
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "tools", "artifactId": "tools",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_PhoenixTools", "libName": "CTRE_PhoenixTools",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -181,6 +220,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"linuxathena" "linuxathena"
], ],
"simMode": "hwsim" "simMode": "hwsim"
@@ -188,7 +228,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "wpiapi-cpp-sim", "artifactId": "wpiapi-cpp-sim",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_Phoenix6_WPISim", "libName": "CTRE_Phoenix6_WPISim",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -196,6 +236,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -203,7 +244,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim", "artifactId": "tools-sim",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_PhoenixTools_Sim", "libName": "CTRE_PhoenixTools_Sim",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -211,6 +252,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -218,7 +260,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX", "artifactId": "simTalonSRX",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimTalonSRX", "libName": "CTRE_SimTalonSRX",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -226,21 +268,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"osxuniversal" "linuxarm64",
],
"simMode": "swsim"
},
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonFX",
"version": "24.3.0",
"libName": "CTRE_SimTalonFX",
"headerClassifier": "headers",
"sharedLibrary": true,
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"windowsx86-64",
"linuxx86-64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -248,7 +276,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX", "artifactId": "simVictorSPX",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimVictorSPX", "libName": "CTRE_SimVictorSPX",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -256,6 +284,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -263,7 +292,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU", "artifactId": "simPigeonIMU",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimPigeonIMU", "libName": "CTRE_SimPigeonIMU",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -271,6 +300,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -278,7 +308,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simCANCoder", "artifactId": "simCANCoder",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimCANCoder", "libName": "CTRE_SimCANCoder",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -286,6 +316,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -293,7 +324,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX", "artifactId": "simProTalonFX",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimProTalonFX", "libName": "CTRE_SimProTalonFX",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -301,6 +332,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -308,7 +340,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder", "artifactId": "simProCANcoder",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimProCANcoder", "libName": "CTRE_SimProCANcoder",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -316,6 +348,7 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
@@ -323,7 +356,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2", "artifactId": "simProPigeon2",
"version": "24.3.0", "version": "25.1.0",
"libName": "CTRE_SimProPigeon2", "libName": "CTRE_SimProPigeon2",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@@ -331,6 +364,23 @@
"binaryPlatforms": [ "binaryPlatforms": [
"windowsx86-64", "windowsx86-64",
"linuxx86-64", "linuxx86-64",
"linuxarm64",
"osxuniversal"
],
"simMode": "swsim"
},
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange",
"version": "25.1.0",
"libName": "CTRE_SimProCANrange",
"headerClassifier": "headers",
"sharedLibrary": true,
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"windowsx86-64",
"linuxx86-64",
"linuxarm64",
"osxuniversal" "osxuniversal"
], ],
"simMode": "swsim" "simMode": "swsim"
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "WPILib-New-Commands", "name": "WPILib-New-Commands",
"version": "1.0.0", "version": "1.0.0",
"uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266",
"frcYear": "2024", "frcYear": "2025",
"mavenUrls": [], "mavenUrls": [],
"jsonUrl": "", "jsonUrl": "",
"javaDependencies": [ "javaDependencies": [
-35
View File
@@ -1,35 +0,0 @@
{
"fileName": "navx_frc.json",
"name": "KauaiLabs_navX_FRC",
"version": "3.1.413",
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b",
"mavenUrls": [
"https://repo1.maven.org/maven2/"
],
"jsonUrl": "https://www.kauailabs.com/dist/frc/2020/navx_frc.json",
"javaDependencies": [
{
"groupId": "com.kauailabs.navx.frc",
"artifactId": "navx-java",
"version": "3.1.413"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.kauailabs.navx.frc",
"artifactId": "navx-cpp",
"version": "3.1.413",
"headerClassifier": "headers",
"sourcesClassifier": "sources",
"sharedLibrary": false,
"libName": "navx_frc",
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"linuxathena",
"linuxraspbian",
"windowsx86-64"
]
}
]
}