diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/components/TeleOpMovement.kt b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/components/TeleOpMovement.kt index f2111509..41043c23 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/components/TeleOpMovement.kt +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/components/TeleOpMovement.kt @@ -13,13 +13,10 @@ import kotlin.math.sqrt * Requires the [TriWheels] API. */ object TeleOpMovement : Component { - private const val ROTATION_GAIN = 0.6 - private const val SLOW_MULTIPLIER = 0.4 - override fun loop(opMode: OpMode) { // alias gamepad1 val gamepad = opMode.gamepad1 - val rotationPower = ROTATION_GAIN * -gamepad.right_stick_x.toDouble() + val rotationPower = RobotConfig.TeleOpMovement.ROTATION_GAIN * -gamepad.right_stick_x.toDouble() // joystick input val joyX = -gamepad.left_stick_x.toDouble() @@ -32,7 +29,7 @@ object TeleOpMovement : Component { // if the right bumper is pressed move slower if (gamepad.right_bumper) { - joyMagnitude *= SLOW_MULTIPLIER + joyMagnitude *= RobotConfig.TeleOpMovement.SLOW_MULTIPLIER } // movement of all wheels diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utils/RobotConfig.kt b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utils/RobotConfig.kt index f702a030..ef4176a2 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utils/RobotConfig.kt +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/utils/RobotConfig.kt @@ -149,6 +149,12 @@ object RobotConfig { @JvmField var ROTATE_SPEED: Double = 0.5 + + @JvmField + var ROTATION_GAIN: Double = 0.6 + + @JvmField + var SLOW_MULTIPLIER: Double = 0.4 } /**