From a2266e153072e1785e67a7c286c4384d1ec1f7b8 Mon Sep 17 00:00:00 2001 From: Ian Shi Date: Sat, 14 Sep 2024 17:13:00 -0400 Subject: [PATCH] update RC for driving --- .../stuypulse/robot/commands/swerve/SwerveDriveDrive.java | 7 ++++--- src/main/java/com/stuypulse/robot/constants/Settings.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/stuypulse/robot/commands/swerve/SwerveDriveDrive.java b/src/main/java/com/stuypulse/robot/commands/swerve/SwerveDriveDrive.java index 9d927fbe..c22f55e3 100644 --- a/src/main/java/com/stuypulse/robot/commands/swerve/SwerveDriveDrive.java +++ b/src/main/java/com/stuypulse/robot/commands/swerve/SwerveDriveDrive.java @@ -7,6 +7,7 @@ import com.stuypulse.stuylib.streams.vectors.VStream; import com.stuypulse.stuylib.streams.vectors.filters.VDeadZone; import com.stuypulse.stuylib.streams.vectors.filters.VLowPassFilter; +import com.stuypulse.stuylib.streams.vectors.filters.VMotionProfile; import com.stuypulse.stuylib.streams.vectors.filters.VRateLimit; import com.stuypulse.robot.constants.Settings.Driver.Drive; @@ -34,15 +35,15 @@ public SwerveDriveDrive(Gamepad driver) { x -> x.clamp(1), x -> x.pow(Drive.POWER.get()), x -> x.mul(Drive.MAX_TELEOP_SPEED.get()), - new VRateLimit(Drive.MAX_TELEOP_ACCEL.get()), - new VLowPassFilter(Drive.RC.get())); + new VRateLimit(Drive.MAX_TELEOP_ACCEL), + new VLowPassFilter(Drive.RC)); turn = IStream.create(driver::getRightX) .filtered( x -> SLMath.deadband(x, Turn.DEADBAND.get()), x -> SLMath.spow(x, Turn.POWER.get()), x -> x * Turn.MAX_TELEOP_TURN_SPEED.get(), - new LowPassFilter(Turn.RC.get())); + new LowPassFilter(Turn.RC)); this.driver = driver; diff --git a/src/main/java/com/stuypulse/robot/constants/Settings.java b/src/main/java/com/stuypulse/robot/constants/Settings.java index 288c1c1c..6f1725bb 100644 --- a/src/main/java/com/stuypulse/robot/constants/Settings.java +++ b/src/main/java/com/stuypulse/robot/constants/Settings.java @@ -334,7 +334,7 @@ public interface Driver { public interface Drive { SmartNumber DEADBAND = new SmartNumber("Driver Settings/Drive/Deadband", 0.03); - SmartNumber RC = new SmartNumber("Driver Settings/Drive/RC", 0.01); + SmartNumber RC = new SmartNumber("Driver Settings/Drive/RC", 0.05); SmartNumber POWER = new SmartNumber("Driver Settings/Drive/Power", 2); SmartNumber MAX_TELEOP_SPEED = new SmartNumber("Driver Settings/Drive/Max Speed", Swerve.MAX_LINEAR_VELOCITY);