From 8a9b83b410f2a8549a67a5105d692c167f099ad8 Mon Sep 17 00:00:00 2001 From: Jack Nelson Date: Mon, 8 Jan 2024 11:09:02 -0500 Subject: [PATCH] update pathplannerlib --- .../java/frc/robot/subsystems/DriveSubsystem.java | 12 ++++++++++++ vendordeps/PathplannerLib.json | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/DriveSubsystem.java b/src/main/java/frc/robot/subsystems/DriveSubsystem.java index a8daae3..e757ad9 100644 --- a/src/main/java/frc/robot/subsystems/DriveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/DriveSubsystem.java @@ -15,6 +15,7 @@ import edu.wpi.first.math.kinematics.ChassisSpeeds; import edu.wpi.first.math.kinematics.DifferentialDriveWheelSpeeds; import edu.wpi.first.math.trajectory.TrapezoidProfile; +import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.Encoder; import edu.wpi.first.wpilibj.SPI; import edu.wpi.first.wpilibj.drive.DifferentialDrive; @@ -166,6 +167,17 @@ public DriveSubsystem() { this::getSpeeds, // A method for getting the chassis' current speed and direction this::setSpeeds, // A consumer that takes the desired chassis speed and direction DriveConstants.autoReplanningConfig, + () -> { + // Boolean supplier that controls when the path will be mirrored for the red alliance + // This will flip the path being followed to the red side of the field. + // THE ORIGIN WILL REMAIN ON THE BLUE SIDE + + var alliance = DriverStation.getAlliance(); + if (alliance.isPresent()) { + return alliance.get() == DriverStation.Alliance.Red; + } + return false; + }, this // Reference to this subsystem to set requirements ); diff --git a/vendordeps/PathplannerLib.json b/vendordeps/PathplannerLib.json index 3e18a45..e334459 100644 --- a/vendordeps/PathplannerLib.json +++ b/vendordeps/PathplannerLib.json @@ -1,7 +1,7 @@ { "fileName": "PathplannerLib.json", "name": "PathplannerLib", - "version": "2024.0.0-beta-6.2", + "version": "2024.1.1", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "frcYear": "2024", "mavenUrls": [ @@ -12,7 +12,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2024.0.0-beta-6.2" + "version": "2024.1.1" } ], "jniDependencies": [], @@ -20,7 +20,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2024.0.0-beta-6.2", + "version": "2024.1.1", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false,