Applied 80% Output Limit, Fixed PID 1/2 Distance Problem

This commit is contained in:
Aarav Shah
2020-02-28 19:13:38 -07:00
parent d83d21e062
commit ad50840f7c
3 changed files with 13 additions and 6 deletions
@@ -58,11 +58,18 @@ public class DriveWithJoystick extends CommandBase {
} else {
steerOutput = 0;
}
double tempOutputLimit = 0.8;
if (moveOutput > 0.5) {
moveOutput = 0.5;
} else if(moveOutput < -0.5) {
moveOutput = -0.5;
if (moveOutput > tempOutputLimit) {
moveOutput = tempOutputLimit;
} else if(moveOutput < -tempOutputLimit) {
moveOutput = -tempOutputLimit;
}
if (steerOutput > tempOutputLimit) {
steerOutput = tempOutputLimit;
} else if(steerOutput < -tempOutputLimit) {
steerOutput = -tempOutputLimit;
}
SmartDashboard.putNumber("Steer Output Test", moveOutput);