Merge branch 'master' into auto-programming

This commit is contained in:
Keenan D. Buckley
2020-03-06 20:44:58 -07:00
59 changed files with 822 additions and 589 deletions
+15 -11
View File
@@ -10,6 +10,7 @@ package frc4388.robot;
import com.ctre.phoenix.motorcontrol.SupplyCurrentLimitConfiguration;
import edu.wpi.first.wpilibj.kinematics.DifferentialDriveKinematics;
import frc4388.utility.Gains;
import frc4388.utility.LEDPatterns;
/**
@@ -44,6 +45,8 @@ public final class Constants {
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG =
new SupplyCurrentLimitConfiguration(false, 60, 40, 2);
public static final int CLOSED_LOOP_TIME_MS = 1; // Higher numbers mean slower control loops
public static final double COS_MULTIPLIER_LOW = 1.0;
public static final double COS_MULTIPLIER_HIGH = 0.8;
/* Drive Train Characteristics */
public static final double MOTOR_ROT_PER_WHEEL_ROT_HIGH = 5.13;
@@ -121,15 +124,18 @@ public final class Constants {
public static final int SHOOTER_SLOT_IDX = 0;
public static final int SHOOTER_PID_LOOP_IDX = 1;
public static final int SHOOTER_TIMEOUT_MS = 30;
//public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.4, 0.0005, 13, 0.05, 0, 1.0);
public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.2, 0.0, 0, 0.0453, 0, 1.0);
public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.4, 0.0005, 13, 0.05, 0, 1.0);
//public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.0, 0.0, 0.0, 0.05, 0, 1.0);
public static final Gains SHOOTER_TURRET_GAINS = new Gains(0.0, 0.0, 0.0, 0.0, 0, 1.0);
public static final Gains SHOOTER_ANGLE_GAINS = new Gains(0.05, 0.0, 0.0, 0.0, 0, 1.0);
public static final Gains SHOOTER_ANGLE_GAINS = new Gains(0.05, 0.0, 0.0, 0.0, 0, 0.3);
public static final double SHOOTER_TURRET_MIN = -1.0;
public static final double ENCODER_TICKS_PER_REV = 2048;
public static final double NEO_UNITS_PER_REV = 42;
public static final double DEGREES_PER_ROT = 360;
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG =
new SupplyCurrentLimitConfiguration(true, 60, 40, 0.5);
public static final int TURRET_RIGHT_SOFT_LIMIT = -2;
public static final int TURRET_LEFT_SOFT_LIMIT = -55;
public static final double TURRET_SPEED_MULTIPLIER = 0.3;
@@ -139,7 +145,7 @@ public final class Constants {
public static final int HOOD_DOWN_SOFT_LIMIT = 3;
public static final double HOOD_CONVERT_SLOPE = 0.47;
public static final double HOOD_CONVERT_B = 40.5;
public static final double HOOD_CALIBRATE_SPEED = 0.1;
public static final double HOOD_CALIBRATE_SPEED = 0.2;
public static final double DRUM_RAMP_LIMIT = 1000;
public static final double DRUM_VELOCITY_BOUND = 300;
@@ -161,12 +167,10 @@ public final class Constants {
public static final double STORAGE_TIMEOUT = 2000;
/* Ball Indexes */
public static final int BEAM_SENSOR_DIO_0 = 0;
public static final int BEAM_SENSOR_DIO_1 = 1;
public static final int BEAM_SENSOR_DIO_2 = 2;
public static final int BEAM_SENSOR_DIO_3 = 3;
public static final int BEAM_SENSOR_DIO_4 = 4;
public static final int BEAM_SENSOR_DIO_5 = 5;
public static final int BEAM_SENSOR_SHOOTER = 1;
public static final int BEAM_SENSOR_USELESS = 2;
public static final int BEAM_SENSOR_STORAGE = 3;
public static final int BEAM_SENSOR_INTAKE = 4;
/* PID Values */
public static final int SLOT_DISTANCE = 0;
@@ -196,7 +200,7 @@ public final class Constants {
public static final class VisionConstants {
public static final double FOV = 29.8; //Field of view of limelight
public static final double TARGET_HEIGHT = 64;
public static final double TARGET_HEIGHT = 71;
public static final double LIME_ANGLE = 25;
public static final double TURN_P_VALUE = 0.65;
public static final double X_ANGLE_ERROR = 1.3;