Separated Steer and Drive Factor

This commit is contained in:
Aarav Shah
2021-11-29 17:13:16 -07:00
parent 960959a4b5
commit 76eae268a0
2 changed files with 5 additions and 2 deletions
@@ -43,7 +43,7 @@ public class DriveWithJoystick extends CommandBase {
@Override
public void execute() {
double moveInput = m_controller.getLeftYAxis() * DriveConstants.DRIVE_WITH_JOYSTICK_FACTOR;
double steerInput = m_controller.getRightXAxis() * DriveConstants.DRIVE_WITH_JOYSTICK_FACTOR;
double steerInput = m_controller.getRightXAxis() * DriveConstants.STEER_WITH_JOYSTICK_FACTOR;
double moveOutput = Math.copySign(1 - Math.cos(Math.PI * moveInput / 2), moveInput);
double cosMultiplier = m_pneumatics.m_isSpeedShiftHigh ? DriveConstants.COS_MULTIPLIER_HIGH : DriveConstants.COS_MULTIPLIER_LOW;
double deadzone = 0.1;