Removed Output Limits, Added GotoCoordinates Command

This commit is contained in:
Aarav Shah
2020-02-28 20:48:22 -07:00
parent ad50840f7c
commit a70983a4c2
5 changed files with 86 additions and 14 deletions
@@ -60,19 +60,22 @@ public class DriveWithJoystick extends CommandBase {
}
double tempOutputLimit = 0.8;
if (moveOutput > tempOutputLimit) {
moveOutput = tempOutputLimit;
} else if(moveOutput < -tempOutputLimit) {
moveOutput = -tempOutputLimit;
}
boolean isOutputLimited = false;
if (steerOutput > tempOutputLimit) {
steerOutput = tempOutputLimit;
} else if(steerOutput < -tempOutputLimit) {
steerOutput = -tempOutputLimit;
}
if (isOutputLimited) {
if (moveOutput > tempOutputLimit) {
moveOutput = tempOutputLimit;
} else if(moveOutput < -tempOutputLimit) {
moveOutput = -tempOutputLimit;
}
SmartDashboard.putNumber("Steer Output Test", moveOutput);
if (steerOutput > tempOutputLimit) {
steerOutput = tempOutputLimit;
} else if(steerOutput < -tempOutputLimit) {
steerOutput = -tempOutputLimit;
}
}
m_drive.driveWithInput(moveOutput, steerOutput);
}