Skip to content

Commit 687636b

Browse files
committed
Remove unused utilities
1 parent 46c74b5 commit 687636b

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/main/kotlin/org/sert2521/gamename/drivetrain/Drivetrain.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import org.sert2521.gamename.Characteristics
66
import org.sert2521.gamename.Talons
77
import org.sert2521.gamename.util.Logger
88
import org.sert2521.gamename.util.Telemetry
9-
import org.sert2521.gamename.util.applyDeadband
109
import org.team2471.frc.lib.actuators.TalonSRX
1110
import org.team2471.frc.lib.framework.DaemonSubsystem
11+
import org.team2471.frc.lib.math.deadband
1212
import kotlin.math.abs
1313
import kotlin.math.max
1414

@@ -85,8 +85,8 @@ object Drivetrain : DaemonSubsystem("Drivetrain") {
8585
feet * 12.0 / Math.PI / Characteristics.WHEEL_DIAMETER * Characteristics.ENCODER_TICKS_PER_REVOLUTION
8686

8787
fun drive(throttle: Double, turn: Double) {
88-
val scaledThrottle = applyDeadband(abs(throttle).coerceAtMost(1.0))
89-
val scaledTurn = applyDeadband(abs(throttle).coerceAtMost(1.0))
88+
val scaledThrottle = abs(throttle).coerceAtMost(1.0).deadband(0.02)
89+
val scaledTurn = abs(throttle).coerceAtMost(1.0).deadband(0.02)
9090

9191
val squaredThrottle = Math.copySign(scaledThrottle * scaledThrottle, throttle)
9292
val squaredTurn = Math.copySign(scaledTurn * scaledTurn, turn)

src/main/kotlin/org/sert2521/gamename/util/Util.kt

-11
This file was deleted.

0 commit comments

Comments
 (0)