Skip to content

Commit

Permalink
added pdp logging
Browse files Browse the repository at this point in the history
  • Loading branch information
catr1xLiu committed Dec 25, 2024
1 parent b6e2bd1 commit 4669354
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.ironmaple.simulation.drivesims.configs.DriveTrainSimulationConfig;
import org.ironmaple.utils.FieldMirroringUtils;
import org.littletonrobotics.junction.Logger;
import org.littletonrobotics.junction.inputs.LoggedPowerDistribution;
import org.littletonrobotics.junction.networktables.LoggedDashboardChooser;

/**
Expand All @@ -47,7 +48,7 @@
*/
public class RobotContainer {
// pdp for akit logging
public final PowerDistribution powerDistribution;
public final LoggedPowerDistribution powerDistribution;
// Subsystems
public final SwerveDrive drive;
public final AprilTagVision aprilTagVision;
Expand Down Expand Up @@ -83,7 +84,7 @@ public RobotContainer() {
// Real robot, instantiate hardware IO implementations
driveSimulation = null;

powerDistribution = new PowerDistribution(0, PowerDistribution.ModuleType.kCTRE);
powerDistribution = LoggedPowerDistribution.getInstance(0, PowerDistribution.ModuleType.kCTRE);

/* CTRE Chassis: */
drive = new SwerveDrive(
Expand Down Expand Up @@ -129,7 +130,7 @@ public RobotContainer() {
new Pose2d(3, 3, new Rotation2d()));
SimulatedArena.getInstance().addDriveTrainSimulation(driveSimulation);

powerDistribution = new PowerDistribution();
powerDistribution = LoggedPowerDistribution.getInstance();
// Sim robot, instantiate physics sim IO implementations
final ModuleIOSim frontLeft = new ModuleIOSim(driveSimulation.getModules()[0]),
frontRight = new ModuleIOSim(driveSimulation.getModules()[1]),
Expand All @@ -154,7 +155,7 @@ public RobotContainer() {
default -> {
this.driveSimulation = null;

powerDistribution = new PowerDistribution();
powerDistribution = LoggedPowerDistribution.getInstance();
// Replayed robot, disable IO implementations
drive = new SwerveDrive(
SwerveDrive.DriveType.GENERIC,
Expand Down

0 comments on commit 4669354

Please sign in to comment.