mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 08:48:01 -06:00
Fix watchdog feeds and steer output curving
This commit is contained in:
@@ -51,9 +51,9 @@ public class DriveWithJoystick extends CommandBase {
|
||||
double cosMultiplier = .55;
|
||||
double deadzone = .2;
|
||||
if (steerInput > 0){
|
||||
steerOutput = -cosMultiplier*Math.cos(1.571*steerInput)+(cosMultiplier+deadzone);
|
||||
steerOutput = -(cosMultiplier - deadzone) * Math.cos(1.571*steerInput) + cosMultiplier;
|
||||
} else if (steerInput < 0) {
|
||||
steerOutput = cosMultiplier*Math.cos(1.571*steerInput)-(cosMultiplier+deadzone);
|
||||
steerOutput = (cosMultiplier - deadzone) * Math.cos(1.571*steerInput) - cosMultiplier;
|
||||
} else {
|
||||
steerOutput = 0;
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ public class Drive extends SubsystemBase {
|
||||
m_leftFrontMotor.setInverted(false);
|
||||
m_rightFrontMotor.setInverted(false);
|
||||
//m_driveTrain.setRightSideInverted(false);
|
||||
//m_leftBackMotor.setInverted(InvertType.FollowMaster);
|
||||
//m_rightBackMotor.setInverted(InvertType.FollowMaster);
|
||||
m_leftBackMotor.setInverted(InvertType.FollowMaster);
|
||||
m_rightBackMotor.setInverted(InvertType.FollowMaster);
|
||||
|
||||
float rampRate = 0.1f;
|
||||
m_rightFrontMotor.configOpenloopRamp(rampRate, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
@@ -128,9 +128,9 @@ public class Drive extends SubsystemBase {
|
||||
m_leftFrontMotor.configOpenloopRamp(rampRate, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.configOpenloopRamp(rampRate, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
|
||||
SupplyCurrentLimitConfiguration c = new SupplyCurrentLimitConfiguration(true, 20, 25, 0.01);
|
||||
m_rightFrontMotor.configSupplyCurrentLimit(c);
|
||||
m_leftFrontMotor.configSupplyCurrentLimit(c);
|
||||
//SupplyCurrentLimitConfiguration c = new SupplyCurrentLimitConfiguration(true, 40, 35, 0.01);
|
||||
//m_rightFrontMotor.configSupplyCurrentLimit(c);
|
||||
//m_leftFrontMotor.configSupplyCurrentLimit(c);
|
||||
|
||||
setDriveTrainNeutralMode(NeutralMode.Coast);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user