diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utilities/Pose.kt b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utilities/Pose.kt index 5d7333dc8605..3db99f2d7904 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utilities/Pose.kt +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utilities/Pose.kt @@ -18,7 +18,7 @@ class Move(forward: LengthUnit, right: LengthUnit, turn: RotationUnit) { val turn = turn.to.radians companion object { - private const val RAMP_ALPHA = 0.15 + const val RAMP_ALPHA = 0.15 private const val RAMP_EPSILON = 0.01 @JvmStatic diff --git a/TeamCode/src/test/java/org/firstinspires/ftc/tests/TestSpeedToPower.kt b/TeamCode/src/test/java/org/firstinspires/ftc/tests/TestSpeedToPower.kt index 648d9c88052e..19d283d2354a 100644 --- a/TeamCode/src/test/java/org/firstinspires/ftc/tests/TestSpeedToPower.kt +++ b/TeamCode/src/test/java/org/firstinspires/ftc/tests/TestSpeedToPower.kt @@ -49,7 +49,7 @@ class TestSpeedToPower { @Test fun `test positive spread`() { for (i in 1 until 100) { - assert(Move.rampSpeedToPower(i / 100.0) in (0.2).rangeTo(1.0)) { + assert(Move.rampSpeedToPower(i / 100.0) in (Move.RAMP_ALPHA).rangeTo(1.0)) { "${Move.rampSpeedToPower(i / 100.0)} (for k=${i/100.0}) is too small" } } @@ -58,7 +58,7 @@ class TestSpeedToPower { @Test fun `test negative spread`() { for (i in 1 until 100) { - assert(Move.rampSpeedToPower(i / -100.0) in (-1.0).rangeTo(-.2)) { + assert(Move.rampSpeedToPower(i / -100.0) in (-1.0).rangeTo(-Move.RAMP_ALPHA)) { "${Move.rampSpeedToPower(i / -100.0)} (for k=${i / -100.0}) is too small" } }