mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
conversions
This commit is contained in:
@@ -46,6 +46,22 @@ public final class Constants {
|
||||
public static final class Conversions {
|
||||
public static final int CANCODER_TICKS_PER_ROTATION = 4096;
|
||||
public static final double JOYSTICK_TO_METERS_PER_SECOND = 5.0;
|
||||
|
||||
public static final double MOTOR_REV_PER_WHEEL_REV = -1; // TODO: find actual ID
|
||||
public static final double TICKS_PER_MOTOR_REV = 2048;
|
||||
public static final double WHEEL_DIAMETER_INCHES = 4.0; // TODO: find actual ID
|
||||
public static final double INCHES_PER_WHEEL_REV = WHEEL_DIAMETER_INCHES * Math.PI;
|
||||
|
||||
public static final double WHEEL_REV_PER_MOTOR_REV = 1 / MOTOR_REV_PER_WHEEL_REV;
|
||||
public static final double TICKS_PER_WHEEL_REV = TICKS_PER_MOTOR_REV * MOTOR_REV_PER_WHEEL_REV;
|
||||
public static final double TICKS_PER_INCH = TICKS_PER_WHEEL_REV / INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK = 1 / TICKS_PER_INCH;
|
||||
|
||||
public static final double TICK_TIME_TO_SECONDS = 10;
|
||||
public static final double SECONDS_TO_TICK_TIME = 1 / TICK_TIME_TO_SECONDS;
|
||||
|
||||
// public static final double
|
||||
|
||||
}
|
||||
|
||||
public static final class Configurations {
|
||||
|
||||
@@ -10,11 +10,11 @@ import frc4388.robot.Robot;
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html
|
||||
public class AutoBalanceTF2 extends PelvicInflamitoryDisease {
|
||||
public class AutoBalance extends PelvicInflamitoryDisease {
|
||||
Robot.MicroBot bot;
|
||||
|
||||
/** Creates a new AutoBalanceTF2. */
|
||||
public AutoBalanceTF2(Robot.MicroBot bot) {
|
||||
public AutoBalance(Robot.MicroBot bot) {
|
||||
super(.7, .1, 15, 0);
|
||||
addRequirements(bot);
|
||||
this.bot = bot;
|
||||
|
||||
Reference in New Issue
Block a user