mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
first day additions
This commit is contained in:
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 145;
|
||||
public static final String GIT_SHA = "d5ff90c1aa76a82571b723631ee8562d9f040026";
|
||||
public static final String GIT_DATE = "2026-03-06 10:57:47 MST";
|
||||
public static final int GIT_REVISION = 146;
|
||||
public static final String GIT_SHA = "0ce384a9402300fbc7b2c1b609c507284c5caa3c";
|
||||
public static final String GIT_DATE = "2026-03-06 22:52:06 MST";
|
||||
public static final String GIT_BRANCH = "PikesPeak";
|
||||
public static final String BUILD_DATE = "2026-03-06 16:34:51 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1772840091676L;
|
||||
public static final String BUILD_DATE = "2026-03-07 15:12:09 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1772921529065L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -143,6 +143,12 @@ public class Shooter extends SubsystemBase {
|
||||
|
||||
badShooterVelocity = Math.abs(shooterSpeed - shooterSpeedTarget) > ShooterConstants.SHOOTER_SPEED_TOLERANCE.get();
|
||||
|
||||
//revtime calculations
|
||||
// double shooterAcceleration =
|
||||
double shooterSpeedTargetPretend = ShooterConstants.getTargetShooterSpeed(distanceToHub).in(RotationsPerSecond);
|
||||
double revTime = (Math.abs(shooterSpeed - shooterSpeedTargetPretend)/((7 - shooterSpeedTargetPretend)/ShooterConstants.T_CONSTANT));
|
||||
// double revTimeExp = ShooterConstants.T_CONSTANT * Math.log(1 - Math.abs(shooterSpeed/shooterSpeedTargetPretend));
|
||||
Logger.recordOutput("Time to rev", revTime);
|
||||
|
||||
switch (mode) {
|
||||
case Shooting:
|
||||
|
||||
@@ -17,6 +17,7 @@ public class ShooterConstants {
|
||||
|
||||
public static final double SHOOTERMOTOR_GEAR_RATIO = 1.5;
|
||||
public static final double INDEXER_GEAR_RATIO = 1.;
|
||||
public static final double T_CONSTANT = 2;
|
||||
|
||||
public static final ConfigurableDouble SHOOTER_MAX_VELOCITY = new ConfigurableDouble("Shooter MAX Velocity", 60);
|
||||
public static final ConfigurableDouble SHOOTER_OVERRIDE_VELOCITY = new ConfigurableDouble("Shooter OVERRIDE Velocity", -42);
|
||||
@@ -29,7 +30,7 @@ public class ShooterConstants {
|
||||
|
||||
public static final ConfigurableDouble INDEXER_FORWARD_OUTPUT = new ConfigurableDouble("Indexer FWD % Output", -0.4);
|
||||
public static final ConfigurableDouble INDEXER_REVERSE_OUTPUT = new ConfigurableDouble("Indexer reverse % Output", 0.0);
|
||||
public static final ConfigurableDouble MODEL_TRIM = new ConfigurableDouble("TRIM SHOOTER SPEED", 0.0);
|
||||
public static final ConfigurableDouble MODEL_TRIM = new ConfigurableDouble("TRIM SHOOTER SPEED", -1.5);
|
||||
|
||||
|
||||
public static final ConfigurableDouble AIM_LEAD_TIME = new ConfigurableDouble("Aim lead time", 0);
|
||||
@@ -55,6 +56,11 @@ public class ShooterConstants {
|
||||
double speed =
|
||||
5.6939*hubDistMeters +
|
||||
22.76545 + MODEL_TRIM.get();
|
||||
|
||||
// double speed =
|
||||
// 0.00610938*hubDistMeters*hubDistMeters
|
||||
// 5.65235*hubDistMeters +
|
||||
// 22.82825;
|
||||
|
||||
double max = SHOOTER_MAX_VELOCITY.get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user