Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
517ae75
initial
FriedLongJohns Jan 12, 2025
d279fe3
fix swerve stuff
FriedLongJohns Jan 13, 2025
c52cbd7
that wasn't supposed to be commented out!
FriedLongJohns Jan 13, 2025
5d10c7f
make it build (when tests excluded)
FriedLongJohns Jan 15, 2025
67bac62
update swerve modueljava
sofiebudman Feb 8, 2025
8ad7479
0
sofiebudman Feb 8, 2025
987fb94
d
sofiebudman Feb 8, 2025
b546166
d
sofiebudman Feb 8, 2025
256b86c
s
sofiebudman Feb 8, 2025
c782a71
remove comment
FriedLongJohns Feb 8, 2025
b712b84
remove space
FriedLongJohns Feb 8, 2025
8d0248d
dubious fixes
FriedLongJohns Feb 8, 2025
f6017cb
revert gradle to before initial commit
FriedLongJohns Feb 9, 2025
e3f8b5c
delete lib199/path*
FriedLongJohns Feb 9, 2025
d7f6b9b
check raw bits instead of pointer values
FriedLongJohns Feb 9, 2025
193cd3f
add baseSparkConfig and deriatives
FriedLongJohns Feb 9, 2025
0e27e13
update calculateWithVelocities
FriedLongJohns Feb 9, 2025
dbfca96
factor in antiGravitationalAcceleration into drivePeriodic
FriedLongJohns Feb 11, 2025
a7a4b9b
add comments to baseSparkXConfig methods
FriedLongJohns Feb 11, 2025
90fc642
remove dummySparkMaxAnswer
FriedLongJohns Feb 16, 2025
f140495
fix and apply drive pos/vel constants
FriedLongJohns Feb 16, 2025
9646d2a
bring back sim support
FriedLongJohns Feb 16, 2025
589ae57
update createDummySparkMax
FriedLongJohns Feb 16, 2025
c13146d
fix average depth not being gotten correctly
FriedLongJohns Feb 16, 2025
bc5e330
put encoder back
FriedLongJohns Feb 18, 2025
32da183
simplify sparkmax factory
FriedLongJohns Mar 5, 2025
7fc3dd2
mae confiogs public
DriverStationComputer Mar 15, 2025
57a5d84
fix sparkflex constructor
FriedLongJohns Mar 30, 2025
08249e9
updated to wpilib 2025.3.2
timtogan Oct 12, 2025
244a436
fixed the creation of spark flexes?
timtogan Oct 12, 2025
b4438e8
worked on some rev lib errors
timtogan Dec 7, 2025
755be22
Updated MockedEncoder with rev changes
Niosocket11 Dec 7, 2025
0e814d3
Fixed remaining testing issues
Niosocket11 Dec 7, 2025
72bdbc8
resolved most comments
timtogan Dec 7, 2025
e3b64d2
bump java doc github workflow artifact version
timtogan Dec 7, 2025
8f427ef
Merge branch 'master' into 2025
timtogan Dec 7, 2025
ed4d425
replaced @links to setZeroOffset to @code because javadocs can't find…
timtogan Dec 7, 2025
fa9f5f8
added ElasticLib
timtogan Dec 7, 2025
ef64805
added some documentation for the elastic class
timtogan Dec 8, 2025
d330dd5
removed error print statement for sim and uncommented MockSparkMax/Fl…
timtogan Dec 8, 2025
158c96e
Tried adding sim support to CanCoders
timtogan Dec 9, 2025
c3bc942
fixed drive config accessor?
timtogan Dec 11, 2025
bc7f07d
resolved some comments
timtogan Dec 21, 2025
e023ca6
removed some depricated classes/unused imports
timtogan Dec 21, 2025
6b1160d
added sparkConfig, SparkMotorType, MotorControllerType
timtogan Dec 21, 2025
a4f37e4
Deprecated Victor controllers and createSparkMax(int, MotorConfig), m…
timtogan Dec 22, 2025
3c24b3c
Revert "Tried adding sim support to CanCoders"
timtogan Dec 22, 2025
cf50401
removed some deprecated stuff from MotorErrors, Lib199Subsytem, delet…
timtogan Dec 22, 2025
88c7b6e
made swerverModule work with any neo motor
timtogan Dec 22, 2025
c04004c
fix typo
CoolSpy3 Dec 28, 2025
f6580af
MotorErrorsTest
timtogan Dec 28, 2025
bbe6188
moved Elastic to vendorLibs
timtogan Dec 28, 2025
a96b9c8
Merge pull request #113 from DeepBlueRobotics/elastic
timtogan Dec 28, 2025
3d7ceb3
added LimelightHelpers as a vendorLib
timtogan Dec 28, 2025
3c3086e
make javadocs happy
timtogan Dec 28, 2025
c24939a
resolved a few comments
timtogan Dec 28, 2025
b4d6e0b
resolved more comments
timtogan Dec 29, 2025
cf28366
Merge pull request #114 from DeepBlueRobotics/limelight
timtogan Dec 30, 2025
413cbba
made MotorErrorsTest use sparkSimFaultManager
timtogan Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Generate Javadoc
run: ./gradlew javadoc
- name: Build Artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: ./build/docs/javadoc
deploy-javadoc:
Expand Down
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": 199
}
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
24 changes: 16 additions & 8 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.1"
id "edu.wpi.first.GradleRIO" version "2025.3.2"
id "maven-publish"
id "eclipse"
}
Expand All @@ -11,7 +11,6 @@ java {
}

group 'org.carlmontrobotics'

def ROBOT_MAIN_CLASS = ""

// Define my targets (RoboRIO) and artifacts (deployable files)
Expand All @@ -37,6 +36,8 @@ 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
}
}
}
Expand All @@ -54,6 +55,7 @@ def includeDesktopSupport = true
// 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 All @@ -71,17 +73,24 @@ dependencies {
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()

testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'junit:junit:4.13.2'

implementation 'org.mockito:mockito-core:5.11.0'
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.6'
}

test {
useJUnitPlatform()
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
}

// Simulation configuration (e.g. environment variables).
wpi.sim.addGui().defaultEnabled = true
wpi.sim.addDriverstation()

// Setting up my Jar File.
// Setting up my Jar File.
jar {
// Note: Do NOT add all the libraries to the jar. Doing so will cause robot programs to have
// 2 copies of each of the libraries classes, one from lib199 and one from the robot program.
Expand Down Expand Up @@ -111,11 +120,6 @@ deployArtifact.jarTask = jar
wpi.java.configureExecutableTasks(jar)
wpi.java.configureTestTasks(test)

// Configure string concat to always inline compile
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}

// Allow the generated javadocs to link to the documentation of WPILib and vendor libraries
javadoc {
options.with {
Expand All @@ -129,3 +133,7 @@ javadoc {
}
}

// Configure string concat to always inline compile
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}
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
6 changes: 3 additions & 3 deletions 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 All @@ -20,8 +20,8 @@ pluginManagement {
}
def frcHomeMaven = new File(frcHome, 'maven')
maven {
name 'frcHome'
url frcHomeMaven
name = 'frcHome'
url = frcHomeMaven
}
}
}
Expand Down
29 changes: 0 additions & 29 deletions src/main/java/org/carlmontrobotics/lib199/CachedSparkMax.java

This file was deleted.

This file was deleted.

37 changes: 0 additions & 37 deletions src/main/java/org/carlmontrobotics/lib199/Lib199Subsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ public class Lib199Subsystem implements Subsystem {
private static final CopyOnWriteArrayList<Runnable> periodicSimulationMethods = new CopyOnWriteArrayList<>();
private static final Consumer<Runnable> RUN_RUNNABLE = Runnable::run;

@Deprecated
public static final long asyncSleepTime = 20;

static {
ensureRegistered();
}
Expand Down Expand Up @@ -43,37 +40,10 @@ public static void registerPeriodic(Runnable method) {
periodicMethods.add(method);
}

@Deprecated
/**
* @deprecated Use registerSimulationPeriodic
* @param method
*/
public static void simulationPeriodic(Runnable method) {
registerSimulationPeriodic(method);
}

public static void registerSimulationPeriodic(Runnable method) {
periodicSimulationMethods.add(method);
}

@Deprecated
/**
* @deprecated Use registerPeriodic
* @param method
*/
public static void registerAsyncPeriodic(Runnable method) {
registerPeriodic(method);
}

@Deprecated
/**
* @deprecated Use registerSimulationPeriodic
* @param method
*/
public static void registerAsyncSimulationPeriodic(Runnable method) {
registerSimulationPeriodic(method);
}

@Override
public void periodic() {
periodicMethods.forEach(RUN_RUNNABLE);
Expand All @@ -84,13 +54,6 @@ public void simulationPeriodic() {
periodicSimulationMethods.forEach(RUN_RUNNABLE);
}

@Deprecated
/**
* No longer does anything.
*/
public synchronized void asyncPeriodic() {
}

private Lib199Subsystem() {}

}
16 changes: 11 additions & 5 deletions src/main/java/org/carlmontrobotics/lib199/MotorConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@

public class MotorConfig {

public static final MotorConfig NEO = new MotorConfig(70, 40);
public static final MotorConfig NEO_550 = new MotorConfig(40, 20);
public static final MotorConfig NEO = new MotorConfig(70, 40, MotorControllerType.SPARK_MAX);
public static final MotorConfig NEO_550 = new MotorConfig(70, 40, MotorControllerType.SPARK_MAX);
public static final MotorConfig NEO_2 = new MotorConfig(70, 40, MotorControllerType.SPARK_MAX); //TODO: find the max temp for NEO 2.0

// The temp limit of 100C for the Vortex is based on the fact that its temp sensors are mounted directly on the
// windings (which is not the case for the Neo or Neo550, causing them to have very delayed temp readings) and the
// fact that the winding enamel will melt at 140C.
// See: https://www.chiefdelphi.com/t/rev-robotics-spark-flex-and-neo-vortex/442595/349?u=brettle
// As a result I think 100C should be safe. I wouldn't increase it past 120. --Dean
public static final MotorConfig NEO_VORTEX = new MotorConfig(100, 60);

public static final MotorConfig NEO_VORTEX = new MotorConfig(100, 40, MotorControllerType.SPARK_FLEX);
public static final MotorConfig NEO_SOLO_VORTEX = new MotorConfig(100, 40, MotorControllerType.SPARK_MAX);
public final int temperatureLimitCelsius, currentLimitAmps;
public final MotorControllerType controllerType;

public MotorConfig(int temperatureLimitCelsius, int currentLimitAmps) {
public MotorConfig(int temperatureLimitCelsius, int currentLimitAmps, MotorControllerType controllerType) {
this.temperatureLimitCelsius = temperatureLimitCelsius;
this.currentLimitAmps = currentLimitAmps;
this.controllerType = controllerType;
}

public MotorControllerType getControllerType() {
return controllerType;
}
}
Loading