From ba7e8d59ad628c0435c361bfc876f4086fb8171a Mon Sep 17 00:00:00 2001 From: Tyler-j42 Date: Tue, 20 May 2025 16:47:48 -0400 Subject: [PATCH] no worky --- src/main/java/frc/robot/Robot.java | 2 +- src/main/java/frc/robot/constants/ElevatorConstants.java | 4 ++-- src/main/java/frc/robot/subsystems/Elevator.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 89af11d..21f32ac 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -35,7 +35,7 @@ public Robot() { if (isReal()) { Logger.addDataReceiver(new WPILOGWriter()); // Log to a USB stick ("/U/logs") - //Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables + Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables new PowerDistribution(1, ModuleType.kRev); // Enables power distribution logging } else { setUseTiming(false); // Run as fast as possible diff --git a/src/main/java/frc/robot/constants/ElevatorConstants.java b/src/main/java/frc/robot/constants/ElevatorConstants.java index 5293f28..b657738 100644 --- a/src/main/java/frc/robot/constants/ElevatorConstants.java +++ b/src/main/java/frc/robot/constants/ElevatorConstants.java @@ -35,9 +35,9 @@ public class ElevatorConstants { public static final double kMaintainP = 3; */ - public static final double kP = 5.6;//7; // + public static final double kP = 3;//7; // public static final double kI = 0; - public static final double kD = 0.28;//0.28 + public static final double kD = 0;//.28;//0.28 public static final double kAllowedError = 1; diff --git a/src/main/java/frc/robot/subsystems/Elevator.java b/src/main/java/frc/robot/subsystems/Elevator.java index ca8eb8a..70d8688 100644 --- a/src/main/java/frc/robot/subsystems/Elevator.java +++ b/src/main/java/frc/robot/subsystems/Elevator.java @@ -144,7 +144,7 @@ public class Elevator extends SubsystemBase { }, () -> { controller.setReference( - setpoint.position, + encoder.getPosition(), ControlType.kPosition, ClosedLoopSlot.kSlot0, feedForward.calculate(0.0) @@ -169,7 +169,7 @@ public class Elevator extends SubsystemBase { * @return Sets motor voltage to achieve the target destination */ public Command goToSetpoint(DoubleSupplier setGoal) { - + return startRun(() -> { goal = new TrapezoidProfile.State(setGoal.getAsDouble(), 0.0); }, () -> {