From 9f5ace5c71fb65f5adacf2d4169ba91592b4bb9b Mon Sep 17 00:00:00 2001 From: Drew Whisenant <7390131+drewwhis@users.noreply.github.com> Date: Sun, 11 Jan 2026 10:41:01 -0600 Subject: [PATCH 1/6] fix name --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a4dea7f..1218bcb 100644 --- a/build.gradle +++ b/build.gradle @@ -118,7 +118,7 @@ publishing { publications { mavenJava(MavenPublication) { groupId = 'org.frc538' - artifactId = 'doc' + artifactId = 'leonardo' version = project.version from components.java From 0d87a9668d3501c13ed22f156011c524b5db4f98 Mon Sep 17 00:00:00 2001 From: Drew Whisenant <7390131+drewwhis@users.noreply.github.com> Date: Sun, 11 Jan 2026 10:42:27 -0600 Subject: [PATCH 2/6] move workflows --- .github/{ => workflows}/main.yml | 0 .github/{ => workflows}/pr.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/main.yml (100%) rename .github/{ => workflows}/pr.yml (100%) diff --git a/.github/main.yml b/.github/workflows/main.yml similarity index 100% rename from .github/main.yml rename to .github/workflows/main.yml diff --git a/.github/pr.yml b/.github/workflows/pr.yml similarity index 100% rename from .github/pr.yml rename to .github/workflows/pr.yml From ad2106865cfd1dfd48fc1ea80d69bd4e2935f603 Mon Sep 17 00:00:00 2001 From: Drew Whisenant <7390131+drewwhis@users.noreply.github.com> Date: Sun, 11 Jan 2026 10:47:51 -0600 Subject: [PATCH 3/6] test classes --- src/main/java/frc538/leonardo/can/Kraken.java | 28 ++++++++++++++++++ src/main/java/frc538/leonardo/can/Neo.java | 29 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 src/main/java/frc538/leonardo/can/Kraken.java create mode 100644 src/main/java/frc538/leonardo/can/Neo.java diff --git a/src/main/java/frc538/leonardo/can/Kraken.java b/src/main/java/frc538/leonardo/can/Kraken.java new file mode 100644 index 0000000..57b346b --- /dev/null +++ b/src/main/java/frc538/leonardo/can/Kraken.java @@ -0,0 +1,28 @@ +package frc538.leonardo.can; + +import com.ctre.phoenix6.hardware.TalonFX; + +/** + * Custom wrapping for a TalonFX Motor Controller (Falcon 500) + */ +public class Kraken { + private final TalonFX mTalon; + + /** + * Creates a Falcon with the given CAN ID. + * + * @param canId the CAN ID of the Falcon's TalonFX + */ + public Kraken(int canId) { + mTalon = new TalonFX(canId); + } + + /** + * Sets the output of the motor. + * + * @param scaledOutput motor's output between -1.0 and +1.0 + */ + public void set(double scaledOutput) { + mTalon.set(scaledOutput); + } +} diff --git a/src/main/java/frc538/leonardo/can/Neo.java b/src/main/java/frc538/leonardo/can/Neo.java new file mode 100644 index 0000000..a3e0917 --- /dev/null +++ b/src/main/java/frc538/leonardo/can/Neo.java @@ -0,0 +1,29 @@ +package frc538.leonardo.can; + +import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.SparkLowLevel.MotorType; + +/** + * Custom wrapping for a SPARK Max Motor Controller (Neo or Neo 550) + */ +public class Neo { + private final SparkMax mNeo; + + /** + * Creates a Neo/Neo 550 with the given CAN ID. + * + * @param canId the CAN ID of the Neo's SPARK Max + */ + public Neo(int canId) { + mNeo = new SparkMax(canId, MotorType.kBrushless); + } + + /** + * Sets the output of the motor. + * + * @param scaledOutput motor's output between -1.0 and +1.0 + */ + public void set(double scaledOutput) { + mNeo.set(scaledOutput); + } +} From 90b7a76250925f6e39e1af0024cebfc1f0915d94 Mon Sep 17 00:00:00 2001 From: Drew Whisenant <7390131+drewwhis@users.noreply.github.com> Date: Sun, 11 Jan 2026 10:58:07 -0600 Subject: [PATCH 4/6] remove robot refs --- build.gradle | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build.gradle b/build.gradle index 1218bcb..1e266cb 100644 --- a/build.gradle +++ b/build.gradle @@ -15,8 +15,6 @@ if (project.hasProperty('projVersion')) { project.version = '0.0.0' } -def ROBOT_MAIN_CLASS = "frc.robot.Main" - // Define my targets (RoboRIO) and artifacts (deployable files) // This is added by GradleRIO's backing project DeployUtils. deploy { @@ -35,8 +33,6 @@ 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 } } } @@ -79,10 +75,6 @@ test { 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. 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. @@ -91,7 +83,6 @@ jar { from('src') { into 'backup/src' } from('vendordeps') { into 'backup/vendordeps' } from('build.gradle') { into 'backup' } - manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS) duplicatesStrategy = DuplicatesStrategy.INCLUDE } From 7d7960004839aa58045185c7d661b575560e3238 Mon Sep 17 00:00:00 2001 From: Drew Whisenant <7390131+drewwhis@users.noreply.github.com> Date: Sun, 11 Jan 2026 11:08:13 -0600 Subject: [PATCH 5/6] test in pr workflow --- .github/workflows/pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index fc35768..3a92490 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,4 +29,7 @@ jobs: # Runs a single command using the runners shell - name: Compile and run tests on robot code - run: ./gradlew build \ No newline at end of file + env: + Version: 0.0.${{ github.run_id }} + + run: ./gradlew build -PprojVersion="$Version" \ No newline at end of file From d3caaad0177122c39e663b97823e5db24c9f2a1a Mon Sep 17 00:00:00 2001 From: Drew Whisenant <7390131+drewwhis@users.noreply.github.com> Date: Sun, 11 Jan 2026 11:17:22 -0600 Subject: [PATCH 6/6] try release --- .github/workflows/main.yml | 9 +++++++-- .github/workflows/pr.yml | 5 +---- build.gradle | 11 +++++++++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8993ae7..a3eb57a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,11 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - # Runs a single command using the runners shell - name: Compile and run tests on robot code - run: ./gradlew build \ No newline at end of file + run: ./gradlew build + + - name: Publish package + env: + Version: 0.0.${{ github.run_id }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew publish -PprojVersion="$Version" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3a92490..fc35768 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,7 +29,4 @@ jobs: # Runs a single command using the runners shell - name: Compile and run tests on robot code - env: - Version: 0.0.${{ github.run_id }} - - run: ./gradlew build -PprojVersion="$Version" \ No newline at end of file + run: ./gradlew build \ No newline at end of file diff --git a/build.gradle b/build.gradle index 1e266cb..0eecd1a 100644 --- a/build.gradle +++ b/build.gradle @@ -115,4 +115,15 @@ publishing { from components.java } } + + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/frc538/leonardo" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } }