Skip to content

Commit 6613fd5

Browse files
committed
Fixed multipliers
1 parent eaa94b2 commit 6613fd5

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

bash.exe.stackdump

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Stack trace:
2+
Frame Function Args
3+
000005FA218 001800720DE (0018026270D, 00180217E46, 000005FA218, 000005F9110)
4+
000005FA218 00180046E02 (000005FA178, 00000000000, 00000000000, 000FFFFFFFF)
5+
000005FA218 00180046E42 (001802627C9, 000005FA0C8, 000005FA218, 00000000000)
6+
000005FA218 001800BE61F (00000000000, 00000000000, 00000000000, 00000000000)
7+
000005FA218 001800BE83F (000005FA240, 00000000000, 00000000000, 00000000000)
8+
000005FA2C0 001800BFAFA (000005FA240, 00000000000, 00000000000, 00000000000)
9+
End of stack trace

config/subsystems.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Drive:
1010
F: .01
1111
minISetpoint: 1.0
1212
maxIError: 24.0
13-
# dataLogging: true
13+
dataLogging: true
1414
driveMode: CONTROLLER
1515
maxSpeed: 120.0
1616
Picker:

core/src/main/java/org/teamtators/rotator/commands/DriveTank.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ protected boolean step() {
4141
double leftPower = -driverJoystick.getAxisValue(LogitechF310.Axis.LEFT_STICK_Y);
4242
double rightPower = -driverJoystick.getAxisValue(LogitechF310.Axis.RIGHT_STICK_Y);
4343
leftPower = DriveUtils.applyDriveModifiers(leftPower,
44-
config.deadzone, config.leftMultiplier, config.exponent);
44+
config.deadzone, config.exponent) * config.leftMultiplier;
4545
rightPower = DriveUtils.applyDriveModifiers(rightPower,
46-
config.deadzone, config.rightMultiplier, config.exponent);
46+
config.deadzone, config.exponent) * config.rightMultiplier;
4747

4848
drive.setSpeeds(leftPower, rightPower);
4949

core/src/main/java/org/teamtators/rotator/commands/DriveUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ public class DriveUtils {
99
*
1010
* @param input Original input
1111
* @param deadzone Zone in which to ignore input
12-
* @param multiplier Value to multiply input by
1312
* @param exponent Value to raise input to the power of
1413
* @return Modified input
1514
*/
16-
public static double applyDriveModifiers(double input, double deadzone, double multiplier, double exponent) {
17-
input = applyDeadzone(input * multiplier, deadzone);
15+
public static double applyDriveModifiers(double input, double deadzone, double exponent) {
16+
input = applyDeadzone(input, deadzone);
1817
return applyExponent(input, exponent);
1918
}
2019

core/src/main/java/org/teamtators/rotator/tester/ManualTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected boolean step() {
5050
ComponentTest test = getCurrentTest();
5151
if (test == null) return false;
5252
double axisValue = -joystick.getAxisValue(TEST_AXIS);
53-
axisValue = DriveUtils.applyDriveModifiers(axisValue, DEADZONE, 1.0, EXPONENT);
53+
axisValue = DriveUtils.applyDriveModifiers(axisValue, DEADZONE, EXPONENT);
5454
test.updateAxis(axisValue);
5555
for (LogitechF310.Button button : LogitechF310.Button.values()) {
5656
boolean value = joystick.getButtonValue(button);

0 commit comments

Comments
 (0)