Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
72 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
cc1795d
removed a spark null check and replaced a switch with createConfig()
timtogan Jan 3, 2026
7b2bf1b
added back configAccessor
timtogan Jan 3, 2026
b82dd2f
resloved comment
timtogan Jan 3, 2026
374ed92
fixed big oppise
timtogan Jan 3, 2026
54ccade
Completely removed Victor motors as they are not supported anymore an…
timtogan Jan 4, 2026
30e2947
fixed another oppsie
timtogan Jan 4, 2026
b8896bb
updated all vendorlibs
timtogan Jan 4, 2026
d2a0df1
made a getConfigAccessor method for MotorControllerFactory and made p…
timtogan Jan 11, 2026
a62be8b
moved back drive/turnMotorType
timtogan Jan 11, 2026
6a60bf8
resolved comments
timtogan Jan 14, 2026
628b00c
phoenix java docs
timtogan Jan 14, 2026
7051ae1
organize imports
CoolSpy3 Jan 15, 2026
aed08b5
resolved more comments
timtogan Jan 15, 2026
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 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
36 changes: 20 additions & 16 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.2.1"
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,27 +73,30 @@ dependencies {
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()

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

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. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
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.
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
from sourceSets.main.allSource

// Add the manifest so WPILib knows where to look for our Robot Class.
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)

// There shouldn't be any duplicate classes.
duplicatesStrategy = DuplicatesStrategy.FAIL
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

publishing {
Expand All @@ -111,11 +116,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 +129,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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
12 changes: 6 additions & 6 deletions src/main/java/org/carlmontrobotics/lib199/CachedSparkMax.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.carlmontrobotics.lib199;

import com.revrobotics.CANSparkMax;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.SparkPIDController;
import com.revrobotics.spark.SparkClosedLoopController;
import com.revrobotics.spark.SparkMax;

@Deprecated
public class CachedSparkMax extends CANSparkMax {
public class CachedSparkMax extends SparkMax {

private RelativeEncoder encoder;
private SparkPIDController pidController;
private SparkClosedLoopController pidController;

public CachedSparkMax(int deviceId, MotorType type) {
super(deviceId, type);
Expand All @@ -22,8 +22,8 @@ public RelativeEncoder getEncoder() {
}

@Override
public SparkPIDController getPIDController() {
return pidController == null ? (pidController = super.getPIDController()) : pidController;
public SparkClosedLoopController getClosedLoopController() {
return pidController == null ? (pidController = super.getClosedLoopController()) : pidController;
}

}
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package org.carlmontrobotics.lib199;

import com.revrobotics.CANSparkMax;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.SparkAbsoluteEncoder;
import com.revrobotics.SparkAnalogSensor;
import com.revrobotics.SparkLimitSwitch;
import com.revrobotics.SparkPIDController;
import com.revrobotics.CANSparkBase.IdleMode;
import com.revrobotics.CANSparkLowLevel.MotorType;
import com.revrobotics.SparkPIDController.AccelStrategy;
import com.revrobotics.spark.SparkAbsoluteEncoder;
import com.revrobotics.spark.SparkAnalogSensor;
import com.revrobotics.spark.SparkClosedLoopController;
import com.revrobotics.spark.SparkLimitSwitch;
import com.revrobotics.spark.SparkLowLevel;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import com.revrobotics.spark.config.SparkBaseConfig.IdleMode;
import com.revrobotics.spark.config.MAXMotionConfig;
import com.revrobotics.spark.SparkMax;

import org.mockito.invocation.InvocationOnMock;

Expand All @@ -18,12 +19,12 @@ public class DummySparkMaxAnswer extends REVLibErrorAnswer {

public static final DummySparkMaxAnswer ANSWER = new DummySparkMaxAnswer();

public static final CANSparkMax DUMMY_SPARK_MAX = Mocks.mock(CANSparkMax.class, ANSWER);
public static final SparkMax DUMMY_SPARK_MAX = Mocks.mock(SparkMax.class, ANSWER);

public static final RelativeEncoder DUMMY_ENCODER = Mocks.mock(RelativeEncoder.class, REVLibErrorAnswer.ANSWER);
public static final SparkAnalogSensor DUMMY_ANALOG_SENSOR = Mocks.mock(SparkAnalogSensor.class, REVLibErrorAnswer.ANSWER);
public static final SparkLimitSwitch DUMMY_LIMIT_SWITCH = Mocks.mock(SparkLimitSwitch.class, REVLibErrorAnswer.ANSWER);
public static final SparkPIDController DUMMY_PID_CONTROLLER = Mocks.mock(SparkPIDController.class, ANSWER);
public static final SparkClosedLoopController DUMMY_PID_CONTROLLER = Mocks.mock(SparkClosedLoopController.class, ANSWER);
public static final SparkAbsoluteEncoder DUMMY_ABSOLUTE_ENCODER = Mocks.mock(SparkAbsoluteEncoder.class, ANSWER);


Expand All @@ -36,14 +37,14 @@ public Object answer(InvocationOnMock invocation) throws Throwable {
return DUMMY_ANALOG_SENSOR;
} else if(returnType == SparkLimitSwitch.class) {
return DUMMY_LIMIT_SWITCH;
} else if(returnType == SparkPIDController.class) {
} else if(returnType == SparkClosedLoopController.class) {
return DUMMY_PID_CONTROLLER;
} else if(returnType == MotorType.class) {
return MotorType.kBrushless;
} else if(returnType == IdleMode.class) {
return IdleMode.kBrake;
} else if(returnType == AccelStrategy.class) {
return AccelStrategy.kTrapezoidal;
} else if(returnType == MAXMotionConfig.MAXMotionPositionMode.class) {
return MAXMotionConfig.MAXMotionPositionMode.kMAXMotionTrapezoidal;
} else if(returnType == SparkAbsoluteEncoder.class) {
return DUMMY_ABSOLUTE_ENCODER;
}
Expand Down
Loading
Loading