Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 5a4946c

Browse files
committed
2 parents c332e83 + ebf3886 commit 5a4946c

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
java-version: 17
1919
cache: "gradle"
2020
- name: Validate Gradle wrapper
21-
uses: gradle/actions/wrapper-validation@v3
21+
uses: gradle/actions/wrapper-validation@v4
2222
- name: Assemble project
2323
run: ./gradlew assemble
2424
style:
@@ -36,7 +36,7 @@ jobs:
3636
java-version: 17
3737
cache: "gradle"
3838
- name: Validate Gradle wrapper
39-
uses: gradle/actions/wrapper-validation@v3
39+
uses: gradle/actions/wrapper-validation@v4
4040
- name: Check formatting
4141
run: ./gradlew spotlessCheck
4242
style-python:

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dependencies {
6969
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
7070
simulationRelease wpi.sim.enableRelease()
7171

72-
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3'
72+
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
7373
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
7474
}
7575

@@ -131,6 +131,7 @@ spotless {
131131
googleJavaFormat()
132132
trimTrailingWhitespace()
133133
endWithNewline()
134+
licenseHeader ''
134135

135136
targetExclude('src/main/java/frc/robot/generated/BuildConstants.java')
136137
}

gradle/wrapper/gradle-wrapper.jar

79 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=permwrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/frc/robot/util/state_machines/StateMachine.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
// Copyright (c) FIRST and other WPILib contributors.
2-
// Open Source Software; you can modify and/or share it under the terms of
3-
// the WPILib BSD license file in the root directory of this project.
4-
51
package frc.robot.util.state_machines;
62

73
import dev.doglog.DogLog;
84
import edu.wpi.first.wpilibj2.command.Command;
95
import edu.wpi.first.wpilibj2.command.Commands;
106
import frc.robot.util.scheduling.LifecycleSubsystem;
7+
import frc.robot.util.scheduling.LifecycleSubsystemManager;
118
import frc.robot.util.scheduling.SubsystemPriority;
129
import java.util.Set;
1310

1411
/** A state machine backed by {@link LifecycleSubsystem}. */
1512
public abstract class StateMachine<S extends Enum<S>> extends LifecycleSubsystem {
1613
private S state;
1714

15+
/**
16+
* Creates a new state machine.
17+
*
18+
* @param priority The subsystem priority of this subsystem in {@link LifecycleSubsystemManager}.
19+
* @param initialState The initial/default state of the state machine.
20+
*/
1821
protected StateMachine(SubsystemPriority priority, S initialState) {
1922
super(priority);
2023
state = initialState;
2124
}
2225

26+
/** Processes collecting inputs, state transitions, and state actions. */
2327
@Override
2428
public void robotPeriodic() {
2529
DogLog.log(subsystemName + "/State", state);
@@ -37,11 +41,18 @@ public void robotPeriodic() {
3741
}
3842
}
3943

44+
/**
45+
* Called each loop before processing transitions. Used for retrieving sensor values, etc.
46+
*
47+
* <p>Default behavior is to do nothing.
48+
*/
4049
protected void collectInputs() {}
4150

4251
/**
4352
* Process transitions from one state to another.
4453
*
54+
* <p>Default behavior is to stay in the current state indefinitely.
55+
*
4556
* @param currentState The current state.
4657
* @return The new state after processing transitions.
4758
*/
@@ -56,7 +67,11 @@ protected S getNextState(S currentState) {
5667
*/
5768
protected void afterTransition(S newState) {}
5869

59-
/** Used to change to a new state when a request is made. */
70+
/**
71+
* Used to change to a new state when a request is made.
72+
*
73+
* @param requestedState The new state to transition to.
74+
*/
6075
protected void setStateFromRequest(S requestedState) {
6176
this.state = requestedState;
6277
}

src/main/java/frc/robot/vision/LimelightHelpers.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Copyright (c) FIRST and other WPILib contributors.
2-
// Open Source Software; you can modify and/or share it under the terms of
3-
// the WPILib BSD license file in the root directory of this project.
4-
51
package frc.robot.vision;
62

73
import com.fasterxml.jackson.annotation.JsonFormat;

src/main/java/frc/robot/vision/VisionInterpolationData.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Copyright (c) FIRST and other WPILib contributors.
2-
// Open Source Software; you can modify and/or share it under the terms of
3-
// the WPILib BSD license file in the root directory of this project.
4-
51
package frc.robot.vision;
62

73
import edu.wpi.first.math.geometry.Pose2d;

src/main/java/frc/robot/vision/VisionResult.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Copyright (c) FIRST and other WPILib contributors.
2-
// Open Source Software; you can modify and/or share it under the terms of
3-
// the WPILib BSD license file in the root directory of this project.
4-
51
package frc.robot.vision;
62

73
import edu.wpi.first.math.geometry.Pose2d;

src/main/java/frc/robot/vision/VisionUtil.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Copyright (c) FIRST and other WPILib contributors.
2-
// Open Source Software; you can modify and/or share it under the terms of
3-
// the WPILib BSD license file in the root directory of this project.
4-
51
package frc.robot.vision;
62

73
import edu.wpi.first.math.geometry.Pose2d;

0 commit comments

Comments
 (0)