diff --git a/docs/mkdocs/docs/library/subsystems/bling.md b/docs/mkdocs/docs/library/subsystems/bling.md index f684c6c7..06b6fb8b 100644 --- a/docs/mkdocs/docs/library/subsystems/bling.md +++ b/docs/mkdocs/docs/library/subsystems/bling.md @@ -81,4 +81,4 @@ To add this subsystem to your robot: 3. Set up default command (typically DefaultSetToAllianceColor) 4. Integrate with robot state indicators as needed -This subsystem is designed to be both robust for competition use and flexible for development and testing purposes. \ No newline at end of file +This subsystem is designed to be both robust for competition use and flexible for development and testing purposes. diff --git a/docs/mkdocs/docs/library/subsystems/swerve.md b/docs/mkdocs/docs/library/subsystems/swerve.md index 8f6ef274..fcab823f 100644 --- a/docs/mkdocs/docs/library/subsystems/swerve.md +++ b/docs/mkdocs/docs/library/subsystems/swerve.md @@ -37,7 +37,7 @@ Module configuration is handled in the year-specific TunerConstants files. To co // PID Gains private static final Slot0Configs steerGains = new Slot0Configs() .withKP(100) // Adjust based on your robot's steering response - .withKI(0) + .withKI(0) .withKD(0.2); private static final Slot0Configs driveGains = new Slot0Configs() @@ -63,7 +63,7 @@ public static final PathConstraints PATHFINDING_CONSTRAINTS = new PathConstraint 2. Configure the holonomic drive controller: ```java -public static final PPHolonomicDriveController PP_HOLONOMIC_DRIVE_CONTROLLER = +public static final PPHolonomicDriveController PP_HOLONOMIC_DRIVE_CONTROLLER = new PPHolonomicDriveController( new PIDConstants(2.4, 0, 0.015), // Translation PID new PIDConstants(7.8, 0, 0.015) // Rotation PID @@ -136,7 +136,7 @@ Command pathfindCommand = pathPlanner.getPathFinderCommand( ### Manual Drive Control ```java -swerve.applyRequest(() -> +swerve.applyRequest(() -> new SwerveRequest.FieldCentric() .withVelocityX(joystickX) .withVelocityY(joystickY) @@ -164,4 +164,4 @@ swerve.applyRequest(() -> 4. Telemetry - Monitor module states during testing - Use field visualization to verify odometry - - Log relevant data for troubleshooting \ No newline at end of file + - Log relevant data for troubleshooting diff --git a/docs/mkdocs/site/sitemap.xml b/docs/mkdocs/site/sitemap.xml index 0f8724ef..7962ef42 100644 --- a/docs/mkdocs/site/sitemap.xml +++ b/docs/mkdocs/site/sitemap.xml @@ -1,3 +1,3 @@ - \ No newline at end of file + diff --git a/src/main/java/frc/alotobots/RobotContainer.java b/src/main/java/frc/alotobots/RobotContainer.java index e3010639..4de9af90 100644 --- a/src/main/java/frc/alotobots/RobotContainer.java +++ b/src/main/java/frc/alotobots/RobotContainer.java @@ -117,12 +117,13 @@ private void configureLogicCommands() { // Test OTF Pathplanner to best object hmiStation.testOTFPathplannerButton.onTrue( new PathfindToBestObject( - photonvisionObjectDetectionSubsystem, drivetrainSubsystem, pathPlanner)); + photonvisionObjectDetectionSubsystem, drivetrainSubsystem, pathPlanner, "Note")); // Test Object Detection and FieldCentricFacingAngle hmiStation.driveWhileFacingBestObjectTrigger.toggleOnTrue( new DriveFacingBestObject( photonvisionObjectDetectionSubsystem, drivetrainSubsystem, + "Note", () -> hmiStation.driveFwdAxis() * hmiStation.getDriveXYPerfMode(), () -> hmiStation.driveStrAxis() * hmiStation.getDriveXYPerfMode(), () -> hmiStation.driveRotAxis() * hmiStation.getDriveRotPerfMode())); diff --git a/src/main/java/frc/alotobots/library/bling/BlingSubsystem.java b/src/main/java/frc/alotobots/library/bling/BlingSubsystem.java index 01307d52..fd27ba89 100644 --- a/src/main/java/frc/alotobots/library/bling/BlingSubsystem.java +++ b/src/main/java/frc/alotobots/library/bling/BlingSubsystem.java @@ -14,18 +14,15 @@ /** * Subsystem for controlling LED lighting (Bling) on the robot. * - *

The Bling subsystem manages LED strips connected to a CTRE CANdle controller. - * It supports: - * - Setting solid colors - * - Running animations - * - Queueing colors/animations - * - Alliance-based color schemes - * - Brightness control + *

The Bling subsystem manages LED strips connected to a CTRE CANdle controller. It supports: - + * Setting solid colors - Running animations - Queueing colors/animations - Alliance-based color + * schemes - Brightness control * - *

The subsystem uses a CANdle controller to drive addressable LED strips. - * LED updates happen in the periodic() method. + *

The subsystem uses a CANdle controller to drive addressable LED strips. LED updates happen in + * the periodic() method. * *

Usage example: + * *

  * BlingSubsystem bling = new BlingSubsystem();
  * // Set solid red color
diff --git a/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/DetectedObject.java b/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/DetectedObject.java
index ade649c6..b0ed57ec 100644
--- a/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/DetectedObject.java
+++ b/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/DetectedObject.java
@@ -37,6 +37,7 @@ public GameElement getGameElement() {
     }
     return GAME_ELEMENTS[classId];
   }
+
   private double lastUpdateTime;
 
   /**
diff --git a/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/DriveFacingBestObject.java b/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/DriveFacingBestObject.java
index 2f250831..2ad03264 100644
--- a/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/DriveFacingBestObject.java
+++ b/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/DriveFacingBestObject.java
@@ -7,7 +7,6 @@
 import edu.wpi.first.wpilibj.Timer;
 import edu.wpi.first.wpilibj2.command.Command;
 import frc.alotobots.library.drivetrains.swerve.ctre.SwerveDriveSubsystem;
-import frc.alotobots.library.vision.photonvision.objectdetection.GameElement;
 import frc.alotobots.library.vision.photonvision.objectdetection.PhotonVisionObjectDetectionSubsystem;
 import java.util.function.DoubleSupplier;
 
@@ -88,9 +87,10 @@ public DriveFacingBestObject(
    */
   @Override
   public void execute() {
-    var detectedObjects = objectDetectionSubsystem.getDetectedObjects().stream()
-        .filter(obj -> obj.getGameElement().getName().equals(targetGameElementName))
-        .toList();
+    var detectedObjects =
+        objectDetectionSubsystem.getDetectedObjects().stream()
+            .filter(obj -> obj.getGameElement().getName().equals(targetGameElementName))
+            .toList();
 
     if (!detectedObjects.isEmpty()) {
       Rotation2d angle = detectedObjects.get(0).getAngle();
@@ -108,8 +108,7 @@ public void execute() {
     }
 
     // Rotation override timeout
-    if (!detectedObjects.isEmpty()
-        && velocityRotation.getAsDouble() != 0) {
+    if (!detectedObjects.isEmpty() && velocityRotation.getAsDouble() != 0) {
       overrideTimer.start();
     } else {
       overrideTimer.reset();
diff --git a/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/PathfindToBestObject.java b/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/PathfindToBestObject.java
index 7416974e..bddf5563 100644
--- a/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/PathfindToBestObject.java
+++ b/src/main/java/frc/alotobots/library/vision/photonvision/objectdetection/commands/PathfindToBestObject.java
@@ -33,9 +33,10 @@ public PathfindToBestObject(
 
   @Override
   public void initialize() {
-    var detectedObjects = objectDetectionSubsystem.getDetectedObjects().stream()
-        .filter(obj -> obj.getGameElement().getName().equals(targetGameElementName))
-        .toList();
+    var detectedObjects =
+        objectDetectionSubsystem.getDetectedObjects().stream()
+            .filter(obj -> obj.getGameElement().getName().equals(targetGameElementName))
+            .toList();
     if (detectedObjects.isEmpty()) {
       return;
     }