From f9983c6f71af186007482388f4d0c0d777dd8921 Mon Sep 17 00:00:00 2001 From: "Team 3128: Controls" <35188310+ControlsNarwhal@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:57:43 -0800 Subject: [PATCH] Workshop 12/14 --- src/main/java/frc/team3128/Constants.java | 8 ++++---- src/main/java/frc/team3128/subsystems/Leds.java | 6 ++++-- src/main/java/frc/team3128/subsystems/Manipulator.java | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/frc/team3128/Constants.java b/src/main/java/frc/team3128/Constants.java index ada6d15..2060078 100644 --- a/src/main/java/frc/team3128/Constants.java +++ b/src/main/java/frc/team3128/Constants.java @@ -339,13 +339,13 @@ public static Rotation2d flipRotation(Rotation2d rotation) { public static class WristConstants { - public static final double kP = 0.4; + public static final double kP = 0.6;//0.4; public static final double kI = 0; public static final double kD = 0; - public static final double kS = 0.19; + public static final double kS = 0.21;//0.19; public static final double kV = 0; - public static final double kG = 0.2; + public static final double kG = 0.33;//0.2; public static final double GEAR_RATIO = 76.235; //72,3 @@ -377,7 +377,7 @@ public static class ElevatorConstants { public static final int ELV1_ID = 11; public static final int ELV2_ID = 12; - public static final double kP = 1; + public static final double kP = 2.4; public static final double kI = 0; public static final double kD = 0; diff --git a/src/main/java/frc/team3128/subsystems/Leds.java b/src/main/java/frc/team3128/subsystems/Leds.java index 0b4c8c3..13fc659 100644 --- a/src/main/java/frc/team3128/subsystems/Leds.java +++ b/src/main/java/frc/team3128/subsystems/Leds.java @@ -66,8 +66,10 @@ public void setElevatorLeds(Colors color) { m_candle.animate(new SingleFadeAnimation(color.r, color.g, color.b,LedConstants.WHITE_VALUE,LedConstants.HOLDING_SPEED,LedConstants.PIVOT_COUNT),0); break; default : - resetAnimationSlot(2); - m_candle.setLEDs(color.r,color.g,color.b,LedConstants.WHITE_VALUE,LedConstants.STARTING_ID,LedConstants.PIVOT_COUNT); + m_candle.animate(new RainbowAnimation(LedConstants.RainbowAnimation.BRIGHTNESS,LedConstants.RainbowAnimation.SPEED,LedConstants.PIVOT_COUNT_FRONT,false,LedConstants.STARTING_ID),0); + m_candle.animate(new RainbowAnimation(LedConstants.RainbowAnimation.BRIGHTNESS,LedConstants.RainbowAnimation.SPEED,LedConstants.PIVOT_COUNT_BACK,true,LedConstants.STARTING_ID+LedConstants.PIVOT_COUNT_FRONT),1); + // resetAnimationSlot(2); + // m_candle.setLEDs(color.r,color.g,color.b,LedConstants.WHITE_VALUE,LedConstants.STARTING_ID,LedConstants.PIVOT_COUNT); break; } } diff --git a/src/main/java/frc/team3128/subsystems/Manipulator.java b/src/main/java/frc/team3128/subsystems/Manipulator.java index dccbd2b..b2ef096 100644 --- a/src/main/java/frc/team3128/subsystems/Manipulator.java +++ b/src/main/java/frc/team3128/subsystems/Manipulator.java @@ -28,7 +28,7 @@ public Manipulator(){ } private void configMotor(){ m_roller = new NAR_TalonSRX(ROLLER_MOTOR_ID); - m_roller.setInverted(false); + m_roller.setInverted(true); m_roller.setNeutralMode(NeutralMode.Brake); }