adjusted shooter for new flywheels
This commit is contained in:
@@ -362,7 +362,7 @@ public class RobotContainer {
|
||||
secondary.setRumble(RumbleType.kBothRumble, 0);
|
||||
},
|
||||
() -> false
|
||||
).withTimeout(5)
|
||||
).withTimeout(1)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,18 +41,18 @@ public class ShooterConstants {
|
||||
public static final boolean kLeftShooterMotorInverted = true;
|
||||
public static final boolean kRightShooterMotorInverted = false;
|
||||
|
||||
public static final double kLeftP = 0.001;
|
||||
public static final double kLeftP = 0.04;//0.01;//0.001;
|
||||
public static final double kLeftI = 0;
|
||||
public static final double kLeftD = 0;
|
||||
public static final double kLeftD = 0;//1.8;
|
||||
public static final double kLeftS = 0;
|
||||
public static final double kLeftV = 0.0013;
|
||||
public static final double kLeftV = 0.00129;
|
||||
public static final double kLeftA = 0;
|
||||
|
||||
public static final double kRightP = 0.001;
|
||||
public static final double kRightP = 0.04;//0.001;//0.001;
|
||||
public static final double kRightI = 0;
|
||||
public static final double kRightD = 0.000;
|
||||
public static final double kRightD = 0;
|
||||
public static final double kRightS = 0;
|
||||
public static final double kRightV = 0.00121;
|
||||
public static final double kRightV = 0.00125;
|
||||
public static final double kRightA = 0;
|
||||
|
||||
public static final double kMaxManualSpeedMultiplier = 1;
|
||||
@@ -77,13 +77,15 @@ public class ShooterConstants {
|
||||
.inverted(kLeftShooterMotorInverted);
|
||||
kLeftMotorConfig.absoluteEncoder
|
||||
.positionConversionFactor(1)
|
||||
.velocityConversionFactor(60);
|
||||
.velocityConversionFactor(60)
|
||||
.averageDepth(16); // VERY IMPORTANT FOR RESPONSE OF FLYWHEEL DEFAULTS ARE DOGWATER
|
||||
kLeftMotorConfig.closedLoop
|
||||
.feedbackSensor(FeedbackSensor.kAbsoluteEncoder)
|
||||
.pid(kLeftP, kLeftI, kLeftD)
|
||||
.pid(kLeftP, kLeftI, kLeftD, ClosedLoopSlot.kSlot0)
|
||||
.outputRange(-1, 1)
|
||||
//.allowedClosedLoopError(10.0, ClosedLoopSlot.kSlot0)
|
||||
.feedForward
|
||||
.sva(kLeftS, kLeftV, kLeftA);
|
||||
.sva(kLeftS, kLeftV, kLeftA, ClosedLoopSlot.kSlot0);
|
||||
|
||||
kRightMotorConfig
|
||||
.idleMode(kShooterIdleMode)
|
||||
@@ -92,12 +94,14 @@ public class ShooterConstants {
|
||||
kRightMotorConfig.absoluteEncoder
|
||||
.positionConversionFactor(1)
|
||||
.velocityConversionFactor(60)
|
||||
.averageDepth(16)// VERY IMPORTANT FOR RESPONSE OF FLYWHEEL DEFAULTS ARE DOGWATER
|
||||
.inverted(true);
|
||||
kRightMotorConfig.closedLoop
|
||||
.feedbackSensor(FeedbackSensor.kAbsoluteEncoder)
|
||||
.pid(kRightP, kRightI, kRightD)
|
||||
.outputRange(-1, 1)
|
||||
//.allowedClosedLoopError(10.0, ClosedLoopSlot.kSlot0)
|
||||
.feedForward
|
||||
.sva(kRightS, kRightV, kRightA);
|
||||
.sva(kRightS, kRightV, kRightA, ClosedLoopSlot.kSlot0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user