Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Generate JavaDoc and deploy to GitHub Pages

on:
push:
branches:
[ "main" ]

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'

- name: Generate JavaDoc
run: ./gradlew javadoc

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docs/javadoc
13 changes: 10 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.3.1"
id 'com.diffplug.spotless' version '6.12.0'
id 'com.diffplug.spotless' version "6.12.0"
id "com.peterabeles.gversion" version "1.10"
id "io.freefair.lombok" version "6.6.1"
id "io.freefair.lombok" version "6.6.2"
id("com.github.spotbugs") version "6.0.24"
}

Expand Down Expand Up @@ -147,7 +147,7 @@ spotless {
exclude '**/build/**', '**/build-*/**'
}
toggleOffOn()
googleJavaFormat("1.7").aosp()
googleJavaFormat("1.15.0").aosp()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
Expand Down Expand Up @@ -201,3 +201,10 @@ tasks.spotbugsMain {
setStylesheet("fancy-hist.xsl")
}
}

//Javadoc Gradle task configuation
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
failOnError = false
exclude '**/*.md'
}
4 changes: 3 additions & 1 deletion src/main/java/frc/reefscape/offsets/StateChampsOffsets.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ private static double meterConverter(double offsetInches) {
return meterConversion + halfRobotLength;
}

/** @param degrees */
/**
* @param degrees
*/
private static double radianConverter(double offsetDegrees) {
double radianConversion = Units.degreesToRadians(offsetDegrees);

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/frc/spectrumLib/util/ExpCurve.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public ExpCurve(double expVal, double offset, double scalar, double deadzone) {
setDeadzone(deadzone);
}

/** @param input value to be mapped */
/**
* @param input value to be mapped
*/
@Override
public double calculate(double input) {
double val = calculateOffset(calculateScalar(calculateExpVal(calculateDeadzone(input))));
Expand Down
1 change: 0 additions & 1 deletion src/main/java/frc/spectrumLib/util/Trio.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public C getThird() {
* @param <C> The third object's type.
* @param a The first object.
* @param b The second object.
* @param b The second object.
* @return A trio comprised of the three given objects.
*/
public static <A, B, C> Trio<A, B, C> of(A a, B b, C c) {
Expand Down
28 changes: 21 additions & 7 deletions src/main/java/frc/spectrumLib/vision/Limelight.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,19 @@ public double getVerticalOffset() {
return LimelightHelpers.getTY(config.getName());
}

/** @return Whether the LL has any valid targets (April tags or other vision targets) */
/**
* @return Whether the LL has any valid targets (April tags or other vision targets)
*/
public boolean targetInView() {
if (!isAttached()) {
return false;
}
return LimelightHelpers.getTV(config.getName());
}

/** @return whether the LL sees multiple tags or not */
/**
* @return whether the LL sees multiple tags or not
*/
public boolean multipleTagsInView() {
if (!isAttached()) {
return false;
Expand Down Expand Up @@ -172,7 +176,9 @@ public double getTargetSize() {

/* ::: Pose Retrieval ::: */

/** @return the corresponding LL Pose3d (MEGATAG1) for the alliance in DriverStation.java */
/**
* @return the corresponding LL Pose3d (MEGATAG1) for the alliance in DriverStation.java
*/
public Pose3d getMegaTag1_Pose3d() {
if (!isAttached()) {
return new Pose3d();
Expand All @@ -184,7 +190,9 @@ public Pose3d getMegaTag1_Pose3d() {
return pose3d;
}

/** @return the corresponding LL Pose3d (MEGATAG2) for the alliance in DriverStation.java */
/**
* @return the corresponding LL Pose3d (MEGATAG2) for the alliance in DriverStation.java
*/
public Pose2d getMegaTag2_Pose2d() {
if (!isAttached()) {
return new Pose2d();
Expand Down Expand Up @@ -229,7 +237,9 @@ public boolean hasAccuratePose() {
return multipleTagsInView() && getTargetSize() > 0.1;
}

/** @return the distance of the 2d vector from the camera to closest apriltag */
/**
* @return the distance of the 2d vector from the camera to closest apriltag
*/
public double getDistanceToTagFromCamera() {
if (!isAttached()) {
return 0;
Expand Down Expand Up @@ -316,13 +326,17 @@ public void sendInvalidStatus(String message) {
* Utility Wrappers
*/

/** @return The latest LL results as a LimelightResults object. */
/**
* @return The latest LL results as a LimelightResults object.
*/
@SuppressWarnings("unused")
private LimelightResults retrieveJSON() {
return LimelightHelpers.getLatestResults(config.name);
}

/** @param pipelineIndex use pipeline indexes in {@link VisionConfig} */
/**
* @param pipelineIndex use pipeline indexes in {@link VisionConfig}
*/
public void setLimelightPipeline(int pipelineIndex) {
if (!isAttached()) {
return;
Expand Down