From acf2d9d32c865420101d899e27be2431b652d5c0 Mon Sep 17 00:00:00 2001 From: Sachet Korada Date: Thu, 19 Dec 2024 20:08:31 -0500 Subject: [PATCH] Update to no tune version --- .../teamcode/commands/drive/DriveCommand.kt | 2 +- .../roadrunner/ThreeDeadWheelLocalizer.kt | 6 +- .../messages/DriveCommandMessage.kt | 14 +-- .../messages/MecanumCommandMessage.kt | 12 +-- .../messages/MecanumLocalizerInputsMessage.kt | 24 ++--- .../roadrunner/messages/PoseMessage.kt | 8 +- .../roadrunner/messages/TankCommandMessage.kt | 8 +- .../messages/TankLocalizerInputsMessage.kt | 6 +- .../messages/ThreeDeadWheelInputsMessage.kt | 8 +- .../messages/TwoDeadWheelInputsMessage.kt | 31 ++---- .../subsystems/drive/DriveSubsystem.kt | 94 +++++++------------ 11 files changed, 83 insertions(+), 130 deletions(-) diff --git a/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/commands/drive/DriveCommand.kt b/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/commands/drive/DriveCommand.kt index e3f53ef..3b5915c 100644 --- a/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/commands/drive/DriveCommand.kt +++ b/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/commands/drive/DriveCommand.kt @@ -17,7 +17,7 @@ class DriveCommand( override fun execute() { subsystem.drive( - leftY = zonedDrive(-leftY.invoke() * 0.9, zoneVal).pow(3), + leftY = zonedDrive(leftY.invoke() * 0.9, zoneVal).pow(3), leftX = zonedDrive(leftX.invoke() * 0.9, zoneVal).pow(3), rightX = zonedDrive(rightX.invoke() * 0.9, zoneVal).pow(3), ) diff --git a/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/ThreeDeadWheelLocalizer.kt b/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/ThreeDeadWheelLocalizer.kt index 2cc13d1..e08700b 100644 --- a/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/ThreeDeadWheelLocalizer.kt +++ b/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/ThreeDeadWheelLocalizer.kt @@ -17,9 +17,9 @@ import org.firstinspires.ftc.teamcode.roadrunner.messages.ThreeDeadWheelInputsMe @Config class ThreeDeadWheelLocalizer(hardwareMap: HardwareMap, val inPerTick: Double) : Localizer { class Params { - var par0YTicks: Double = 0.0 // y position of the first parallel encoder (in tick units) - var par1YTicks: Double = 1.0 // y position of the second parallel encoder (in tick units) - var perpXTicks: Double = 0.0 // x position of the perpendicular encoder (in tick units) + @JvmField var par0YTicks: Double = 0.0 // y position of the first parallel encoder (in tick units) + @JvmField var par1YTicks: Double = 1.0 // y position of the second parallel encoder (in tick units) + @JvmField var perpXTicks: Double = 0.0 // x position of the perpendicular encoder (in tick units) } // TODO: make sure your config has **motors** with these names (or change them) diff --git a/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/messages/DriveCommandMessage.kt b/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/messages/DriveCommandMessage.kt index fabde81..73596b0 100644 --- a/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/messages/DriveCommandMessage.kt +++ b/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/roadrunner/messages/DriveCommandMessage.kt @@ -4,11 +4,11 @@ import com.acmerobotics.roadrunner.PoseVelocity2dDual import com.acmerobotics.roadrunner.Time class DriveCommandMessage(poseVelocity: PoseVelocity2dDual