From 85e0e798a22e9261e4ba1890225a79c47cc69c2a Mon Sep 17 00:00:00 2001 From: Aarav Shah Date: Mon, 2 Mar 2020 17:12:20 -0700 Subject: [PATCH] h --- src/main/java/frc4388/robot/Constants.java | 2 ++ .../robot/commands/DriveWithJoystickDriveStraight.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc4388/robot/Constants.java b/src/main/java/frc4388/robot/Constants.java index bf12a83..acc92c8 100644 --- a/src/main/java/frc4388/robot/Constants.java +++ b/src/main/java/frc4388/robot/Constants.java @@ -42,6 +42,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_DRIVE_STRAIGHT = 0.7; + public static final double COS_MULTIPLIER_HIGH_DRIVE_STRAIGHT = 0.7; /* Drive Train Characteristics */ public static final double MOTOR_ROT_PER_WHEEL_ROT_HIGH = 5.13; diff --git a/src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java b/src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java index 8de8d2f..d6a3390 100644 --- a/src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java +++ b/src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java @@ -92,14 +92,14 @@ public class DriveWithJoystickDriveStraight extends CommandBase { private void runDriveWithInput(double move, double steer) { - double cosMultiplier = 0.7; + double cosMultiplier; double steerOutput = 0; double deadzone = .1; if (m_pneumatics.m_isSpeedShiftHigh) { - cosMultiplier = 0.7; + cosMultiplier = DriveConstants.COS_MULTIPLIER_HIGH_DRIVE_STRAIGHT; } else { - cosMultiplier = 0.7; + cosMultiplier = DriveConstants.COS_MULTIPLIER_LOW_DRIVE_STRAIGHT; } /* Curves the steer output to be similarily gradual */