diff --git a/.gitignore b/.gitignore index d243bc4..f68f255 100644 --- a/.gitignore +++ b/.gitignore @@ -172,7 +172,7 @@ out/ *-window.json # Simulation data log directory -# logs/ +logs/ # Folder that has CTRE Phoenix Sim device config storage ctre_sim/ diff --git a/build.gradle b/build.gradle index 4425167..0591c7c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "java" - id "edu.wpi.first.GradleRIO" version "2025.1.1" + id "edu.wpi.first.GradleRIO" version "2025.2.1" id "com.peterabeles.gversion" version "1.10" } diff --git a/simgui.json b/simgui.json index 5aa4636..b720ffb 100644 --- a/simgui.json +++ b/simgui.json @@ -1,7 +1,9 @@ { "NTProvider": { "types": { + "/AdvantageKit/RealOutputs/Alerts": "Alerts", "/FMSInfo": "FMSInfo", + "/SmartDashboard/Alerts": "Alerts", "/SmartDashboard/Auto picker": "String Chooser", "/SmartDashboard/Field": "Field2d" }, @@ -10,6 +12,17 @@ "window": { "visible": true } + }, + "/SmartDashboard/Field": { + "bottom": 1476, + "height": 8.210550308227539, + "left": 150, + "right": 2961, + "top": 79, + "width": 16.541748046875, + "window": { + "visible": true + } } } }, @@ -18,14 +31,15 @@ "open": false }, "transitory": { + "AdvantageKit": { + "open": true + }, "SmartDashboard": { "Auto picker": { - "open": true, "string[]##v_/SmartDashboard/Auto picker/options": { "open": true } - }, - "open": true + } } } }, diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index c888356..da5ce80 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -26,7 +26,6 @@ import frc.robot.controls.controllers.OperatorController; import frc.robot.simulation.Field; import frc.robot.subsystems.Algae; -import frc.robot.subsystems.Compressor; import frc.robot.subsystems.Coral; import frc.robot.subsystems.Drivetrain; import frc.robot.subsystems.Elevator; @@ -53,8 +52,6 @@ public class Robot extends LoggedRobot { // Robot subsystems private List m_allSubsystems = new ArrayList<>(); - // private final Intake m_intake = Intake.getInstance(); - private final Compressor m_compressor = Compressor.getInstance(); private final Drivetrain m_drive = Drivetrain.getInstance(); private final Coral m_coral = Coral.getInstance(); private final Algae m_algae = Algae.getInstance(); @@ -78,7 +75,6 @@ public void robotInit() { setupLogging(); // Add all subsystems to the list - // m_allSubsystems.add(m_compressor); m_allSubsystems.add(m_drive); m_allSubsystems.add(m_coral); m_allSubsystems.add(m_algae); @@ -339,25 +335,32 @@ private void updateSim() { @SuppressWarnings("resource") private void setupLogging() { - Logger.recordMetadata("ProjectName", "Flipside"); // Set a metadata value - - if (isReal()) { - new WPILOGWriter(); // Log to the RoboRIO - - // TODO: Add the next line back with a USB stick - // Logger.addDataReceiver(new WPILOGWriter()); // Log to a USB stick ("/U/logs") - Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables - new PowerDistribution(1, ModuleType.kCTRE); // Enables power distribution logging + System.out.println("Initializing logging..."); + + Logger.recordMetadata("ProjectName", "Bottom Feeder"); + // Logger.recordMetadata("ProjectName", BuildConstants.MAVEN_NAME); + Logger.recordMetadata("BuildDate", BuildConstants.BUILD_DATE); + Logger.recordMetadata("GitSHA", BuildConstants.GIT_SHA); + Logger.recordMetadata("GitDate", BuildConstants.GIT_DATE); + Logger.recordMetadata("GitBranch", BuildConstants.GIT_BRANCH); + + switch (BuildConstants.DIRTY) { + case 0: + Logger.recordMetadata("GitDirty", "All changes committed"); + break; + case 1: + Logger.recordMetadata("GitDirty", "Uncomitted changes"); + break; + default: + Logger.recordMetadata("GitDirty", "Unknown"); + break; } - // else { - // setUseTiming(false); // Run as fast as possible - // String logPath = LogFileUtil.findReplayLog(); // Pull the replay log from - // AdvantageScope (or prompt the user) - // Logger.setReplaySource(new WPILOGReader(logPath)); // Read replay log - // Logger.addDataReceiver(new WPILOGWriter(LogFileUtil.addPathSuffix(logPath, - // "_sim"))); // Save outputs to a new log - // } + Logger.addDataReceiver(new WPILOGWriter()); // Log to a USB stick ("/U/logs") + Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables + new PowerDistribution(1, ModuleType.kCTRE); // Enables power distribution logging + + RobotTelemetry.print("Logging started"); Logger.start(); } } diff --git a/src/main/java/frc/robot/RobotTelemetry.java b/src/main/java/frc/robot/RobotTelemetry.java index 55db67e..8cc5a5d 100644 --- a/src/main/java/frc/robot/RobotTelemetry.java +++ b/src/main/java/frc/robot/RobotTelemetry.java @@ -1,48 +1,8 @@ package frc.robot; -import org.littletonrobotics.junction.Logger; -import org.littletonrobotics.junction.networktables.NT4Publisher; -import org.littletonrobotics.junction.wpilog.WPILOGWriter; - -import edu.wpi.first.wpilibj.PowerDistribution; -import edu.wpi.first.wpilibj.PowerDistribution.ModuleType; import edu.wpi.first.wpilibj.Timer; public class RobotTelemetry { - - @SuppressWarnings("resource") - public RobotTelemetry() { - Logger.recordMetadata("ProjectName", BuildConstants.MAVEN_NAME); - Logger.recordMetadata("BuildDate", BuildConstants.BUILD_DATE); - Logger.recordMetadata("GitSHA", BuildConstants.GIT_SHA); - Logger.recordMetadata("GitDate", BuildConstants.GIT_DATE); - Logger.recordMetadata("GitBranch", BuildConstants.GIT_BRANCH); - switch (BuildConstants.DIRTY) { - case 0: - Logger.recordMetadata("GitDirty", "All changes committed"); - break; - case 1: - Logger.recordMetadata("GitDirty", "Uncomitted changes"); - break; - default: - Logger.recordMetadata("GitDirty", "Unknown"); - break; - } - - // TODO: this - // Logger.recordMetadata("RobotType", RobotConstants.getRobotType().name()); - // Logger.recordMetadata("ProjectName", "Apollo, Eater of Batteries"); - - Logger.addDataReceiver(new WPILOGWriter()); // Log to a USB stick ("/U/logs") - Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables - - new PowerDistribution(1, ModuleType.kRev); // Enables power distribution logging - - Logger.start(); - - print("Logging initialized. Fard."); - } - public static void print(String output) { System.out.println( String.format("%.3f", Timer.getFPGATimestamp()) + " || " + output); diff --git a/vendordeps/PathplannerLib-2025.1.1.json b/vendordeps/PathplannerLib-2025.2.1.json similarity index 87% rename from vendordeps/PathplannerLib-2025.1.1.json rename to vendordeps/PathplannerLib-2025.2.1.json index 6322388..71e25f3 100644 --- a/vendordeps/PathplannerLib-2025.1.1.json +++ b/vendordeps/PathplannerLib-2025.2.1.json @@ -1,7 +1,7 @@ { - "fileName": "PathplannerLib-2025.1.1.json", + "fileName": "PathplannerLib-2025.2.1.json", "name": "PathplannerLib", - "version": "2025.1.1", + "version": "2025.2.1", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "frcYear": "2025", "mavenUrls": [ @@ -12,7 +12,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2025.1.1" + "version": "2025.2.1" } ], "jniDependencies": [], @@ -20,7 +20,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2025.1.1", + "version": "2025.2.1", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false, diff --git a/vendordeps/REVLib.json b/vendordeps/REVLib-2025.0.1.json similarity index 86% rename from vendordeps/REVLib.json rename to vendordeps/REVLib-2025.0.1.json index d091e05..c998054 100644 --- a/vendordeps/REVLib.json +++ b/vendordeps/REVLib-2025.0.1.json @@ -1,7 +1,7 @@ { - "fileName": "REVLib.json", + "fileName": "REVLib-2025.0.1.json", "name": "REVLib", - "version": "2025.0.0", + "version": "2025.0.1", "frcYear": "2025", "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", "mavenUrls": [ @@ -12,19 +12,18 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-java", - "version": "2025.0.0" + "version": "2025.0.1" } ], "jniDependencies": [ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2025.0.0", + "version": "2025.0.1", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ "windowsx86-64", - "windowsx86", "linuxarm64", "linuxx86-64", "linuxathena", @@ -37,14 +36,13 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-cpp", - "version": "2025.0.0", + "version": "2025.0.1", "libName": "REVLib", "headerClassifier": "headers", "sharedLibrary": false, "skipInvalidPlatforms": true, "binaryPlatforms": [ "windowsx86-64", - "windowsx86", "linuxarm64", "linuxx86-64", "linuxathena", @@ -55,14 +53,13 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2025.0.0", + "version": "2025.0.1", "libName": "REVLibDriver", "headerClassifier": "headers", "sharedLibrary": false, "skipInvalidPlatforms": true, "binaryPlatforms": [ "windowsx86-64", - "windowsx86", "linuxarm64", "linuxx86-64", "linuxathena", @@ -71,4 +68,4 @@ ] } ] -} +} \ No newline at end of file