From 9b8d32473d3b004e0ca3a470e7222a6f4a59898b Mon Sep 17 00:00:00 2001 From: drive station Date: Wed, 16 Oct 2024 17:21:25 -0700 Subject: [PATCH] invert joysticks and add new auto --- .../autos/Amp 1 Piece, Mobility.auto | 56 +++++++++++++++++++ .../subsystems/drivetrain/Drivetrain.kt | 4 +- .../frc2024/subsystems/shooter/PivotIO.kt | 2 +- 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/Amp 1 Piece, Mobility.auto diff --git a/src/main/deploy/pathplanner/autos/Amp 1 Piece, Mobility.auto b/src/main/deploy/pathplanner/autos/Amp 1 Piece, Mobility.auto new file mode 100644 index 0000000..beb178c --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Amp 1 Piece, Mobility.auto @@ -0,0 +1,56 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7003471493721009, + "y": 6.668600082397461 + }, + "rotation": 60.52408484195273 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "ensureNoteSecure" + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "revAimSpeaker" + } + }, + { + "type": "named", + "data": { + "name": "shootWhenReady" + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "stow" + } + }, + { + "type": "path", + "data": { + "pathName": "Amp 1-Piece, Mobility 2" + } + } + ] + } + }, + "folder": "Amp Side", + "choreoAuto": true +} \ No newline at end of file diff --git a/src/main/java/com/frcteam3636/frc2024/subsystems/drivetrain/Drivetrain.kt b/src/main/java/com/frcteam3636/frc2024/subsystems/drivetrain/Drivetrain.kt index 3d965fd..401eb4a 100644 --- a/src/main/java/com/frcteam3636/frc2024/subsystems/drivetrain/Drivetrain.kt +++ b/src/main/java/com/frcteam3636/frc2024/subsystems/drivetrain/Drivetrain.kt @@ -241,8 +241,8 @@ object Drivetrain : Subsystem, TalonFXStatusProvider { chassisSpeeds = ChassisSpeeds.fromFieldRelativeSpeeds( - translationInput.x * FREE_SPEED.baseUnitMagnitude() * TRANSLATION_SENSITIVITY, - translationInput.y * FREE_SPEED.baseUnitMagnitude() * TRANSLATION_SENSITIVITY, + -translationInput.x * FREE_SPEED.baseUnitMagnitude() * TRANSLATION_SENSITIVITY, + -translationInput.y * FREE_SPEED.baseUnitMagnitude() * TRANSLATION_SENSITIVITY, -rotationJoystick.x * TAU * ROTATION_SENSITIVITY, gyroRotation.toRotation2d() ) diff --git a/src/main/java/com/frcteam3636/frc2024/subsystems/shooter/PivotIO.kt b/src/main/java/com/frcteam3636/frc2024/subsystems/shooter/PivotIO.kt index a469544..871ee3f 100644 --- a/src/main/java/com/frcteam3636/frc2024/subsystems/shooter/PivotIO.kt +++ b/src/main/java/com/frcteam3636/frc2024/subsystems/shooter/PivotIO.kt @@ -264,7 +264,7 @@ class PivotIOKraken : PivotIO { const val PROFILE_JERK = 80.0 val HARDSTOP_OFFSET: Rotation2d = Rotation2d.fromDegrees(-27.0) - val ABSOLUTE_ENCODER_OFFSET: Rotation2d = Rotation2d.fromDegrees(219.5) + HARDSTOP_OFFSET + val ABSOLUTE_ENCODER_OFFSET: Rotation2d = Rotation2d.fromDegrees(229.5) + HARDSTOP_OFFSET } override val talonCANStatuses = listOf(leftMotor.version, rightMotor.version)