Skip to content

Commit aaf4890

Browse files
authored
changed default speed (new) (#133)
1 parent 1e18d97 commit aaf4890

2 files changed

Lines changed: 4 additions & 55 deletions

File tree

src/main/java/com/team6962/lib/swerve/commands/XBoxTeleopSwerveCommand.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ protected ChassisSpeeds getDrivenVelocity() {
240240
* @return The translation speed scalar (0.0 to 1.0)
241241
*/
242242
private double getNonFineControlTranslationScalar() {
243-
return MathUtil.interpolate(
244-
constants.DefaultTranslationalSpeed, constants.BoostTranslationalSpeed, getBoost());
243+
return constants.DefaultTranslationalSpeed;
245244
}
246245

247246
/**
@@ -251,11 +250,7 @@ private double getNonFineControlTranslationScalar() {
251250
* @return The angular speed scalar (0.0 to 1.0, or higher with super boost)
252251
*/
253252
private double getNonFineControlAngularScalar() {
254-
return MathUtil.interpolate(
255-
MathUtil.interpolate(
256-
constants.DefaultAngularSpeed, constants.BoostAngularSpeed, getBoost()),
257-
Math.signum(constants.DefaultAngularSpeed),
258-
getAngularSuperBoost());
253+
return constants.DefaultAngularSpeed;
259254
}
260255

261256
/**

src/main/java/com/team6962/lib/swerve/config/XBoxTeleopSwerveConstants.java

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class XBoxTeleopSwerveConstants implements Cloneable {
5050
* <li><b>Maximum Value:</b> 1.0
5151
* </ul>
5252
*/
53-
public double DefaultTranslationalSpeed = 0.7;
53+
public double DefaultTranslationalSpeed = 1.0;
5454

5555
/**
5656
* The angular speed used during teleop when not boostin or using the D-pad for fine control. This
@@ -62,31 +62,7 @@ public class XBoxTeleopSwerveConstants implements Cloneable {
6262
* <li><b>Maximum Value:</b> 1.0
6363
* </ul>
6464
*/
65-
public double DefaultAngularSpeed = 0.7;
66-
67-
/**
68-
* The translational speed used during teleop when boosting and not using the D-pad for fine
69-
* control. This is represented as a fraction of the maximum robot speed, where 1.0 is the maximum
70-
* speed and 0.0 is stationary.
71-
*
72-
* <ul>
73-
* <li><b>Minimum Value:</b> 0.0
74-
* <li><b>Maximum Value:</b> 1.0
75-
* </ul>
76-
*/
77-
public double BoostTranslationalSpeed = 1.0;
78-
79-
/**
80-
* The angular speed used during teleop when boosting and not using the D-pad for fine control.
81-
* This is represented as a fraction of the maximum robot angular speed, where 1.0 is the maximum
82-
* angular speed and 0.0 is stationary.
83-
*
84-
* <ul>
85-
* <li><b>Minimum Value:</b> 0.0
86-
* <li><b>Maximum Value:</b> 1.0
87-
* </ul>
88-
*/
89-
public double BoostAngularSpeed = 1.0;
65+
public double DefaultAngularSpeed = 1.0;
9066

9167
/**
9268
* When true, the D-pad on the Xbox controller will enable fine control mode, where the robot
@@ -258,28 +234,6 @@ public XBoxTeleopSwerveConstants withDefaultAngularSpeed(double defaultAngularSp
258234
return this;
259235
}
260236

261-
/**
262-
* Sets the boost translational speed, and returns this XBoxTeleopSwerveConstants for chaining.
263-
*
264-
* @param boostTranslationalSpeed The boost translational speed (0.0-1.0)
265-
* @return This XBoxTeleopSwerveConstants object
266-
*/
267-
public XBoxTeleopSwerveConstants withBoostTranslationalSpeed(double boostTranslationalSpeed) {
268-
BoostTranslationalSpeed = boostTranslationalSpeed;
269-
return this;
270-
}
271-
272-
/**
273-
* Sets the boost angular speed, and returns this XBoxTeleopSwerveConstants for chaining.
274-
*
275-
* @param boostAngularSpeed The boost angular speed (0.0-1.0)
276-
* @return This XBoxTeleopSwerveConstants object
277-
*/
278-
public XBoxTeleopSwerveConstants withBoostAngularSpeed(double boostAngularSpeed) {
279-
BoostAngularSpeed = boostAngularSpeed;
280-
return this;
281-
}
282-
283237
/**
284238
* Sets whether fine control is enabled, and returns this XBoxTeleopSwerveConstants for chaining.
285239
*

0 commit comments

Comments
 (0)