From 2a3e42aeffa3e1d6ff407c3961d3f58105f0d664 Mon Sep 17 00:00:00 2001 From: lukesta182 <33330639+lukesta182@users.noreply.github.com> Date: Sat, 9 Mar 2019 14:23:23 -0700 Subject: [PATCH] Constants Adjustments --- .../java/org/usfirst/frc4388/robot/subsystems/Arm.java | 8 ++++---- .../java/org/usfirst/frc4388/robot/subsystems/Wrist.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java index 3c82ae8..e5049ce 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java @@ -52,7 +52,7 @@ public class Arm extends Subsystem implements ControlLoopable public static final double ZERO_POSITION_INCHES = -0.25; public static final double NEAR_ZERO_POSITION_INCHES = 0.0; public static final double MIN_POSITION_INCHES = 0.0; - public static final double MAX_POSITION_INCHES = 4096; + public static final double MAX_POSITION_INCHES = 3900; public static final double AFTER_INTAKE_POSITION_INCHES = 4.0; public static final double SWITCH_POSITION_INCHES = 24.0; @@ -87,11 +87,11 @@ public class Arm extends Subsystem implements ControlLoopable public static final double KF_UP = 0.01; public static final double KF_DOWN = 0.0; public static final double P_Value = 2; - public static final double I_Value = 0.00300; + public static final double I_Value = 0.00030; public static final double D_Value = 200; public static final double RampRate = 0.0; private PIDParams armPIDParams = new PIDParams(P_Value, I_Value, D_Value, KF_DOWN); // KF gets updated later - public static final double PID_ERROR_INCHES = 5.0; + public static final double PID_ERROR_INCHES = 5; LimitSwitchSource limitSwitchSource; // Pneumatics private Solenoid speedShift; @@ -175,7 +175,7 @@ public class Arm extends Subsystem implements ControlLoopable double startPositionInches = motor1.getPositionWorld(); //mpController.setTarget(targetPositionInchesPID, targetPositionInchesPID > startPositionInches ? KF_UP : KF_DOWN); motor1.set(ControlMode.Position, targetPositionInches); - motor1.configClosedloopRamp(.02); + motor1.configClosedloopRamp(0); //motor1.configPeakCurrentLimit(5); motor1.configContinuousCurrentLimit(2); motor1.config_kP(0, P_Value, TalonSRXEncoder.TIMEOUT_MS); diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java index af02701..e405ce0 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java @@ -85,7 +85,7 @@ public class Wrist extends Subsystem implements ControlLoopable private PIDParams pidPIDParamsHiGear = new PIDParams(0.075, 0.0, 0.0, 0.0, 0.0, 0.0); public static final double KF_UP = 0.01; public static final double KF_DOWN = 0.0; - public static final double P_Value = 2; + public static final double P_Value = .5; public static final double I_Value = 0.00300; public static final double D_Value = 200; public static final double RampRate = 0.0;