From 633ebb0ac93fa96e366c3717f2eda0c5d3edb8fc Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Tue, 31 Oct 2023 19:57:56 -0400 Subject: [PATCH] Changer id swerve --- simgui-ds.json | 5 +++++ simgui.json | 11 ++++++++++- src/main/deploy/swerve/modules/backleft.json | 4 ++-- src/main/deploy/swerve/modules/backright.json | 6 +++--- src/main/deploy/swerve/modules/frontleft.json | 6 +++--- src/main/deploy/swerve/modules/frontright.json | 6 +++--- src/main/java/frc/robot/RobotContainer.java | 2 +- src/main/java/frc/robot/subsystems/Drive.java | 2 +- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/simgui-ds.json b/simgui-ds.json index 73cc713..46c45d8 100644 --- a/simgui-ds.json +++ b/simgui-ds.json @@ -88,5 +88,10 @@ "buttonCount": 0, "povCount": 0 } + ], + "robotJoysticks": [ + { + "guid": "030000006d04000015c2000000000000" + } ] } diff --git a/simgui.json b/simgui.json index 449f4b1..be49c52 100644 --- a/simgui.json +++ b/simgui.json @@ -1,7 +1,16 @@ { "NTProvider": { "types": { - "/FMSInfo": "FMSInfo" + "/FMSInfo": "FMSInfo", + "/SmartDashboard/Field": "Field2d", + "/SmartDashboard/navX-Sensor[1]": "Gyro" + }, + "windows": { + "/SmartDashboard/Field": { + "window": { + "visible": true + } + } } } } diff --git a/src/main/deploy/swerve/modules/backleft.json b/src/main/deploy/swerve/modules/backleft.json index 3ae3fdd..ceabe5f 100644 --- a/src/main/deploy/swerve/modules/backleft.json +++ b/src/main/deploy/swerve/modules/backleft.json @@ -11,12 +11,12 @@ }, "angle": { "type": "sparkmax", - "id": 0, + "id": 1, "canbus": null }, "encoder": { "type": "cancoder", - "id": 0, + "id": 2, "canbus": null }, "inverted": { diff --git a/src/main/deploy/swerve/modules/backright.json b/src/main/deploy/swerve/modules/backright.json index c896a6e..1de02f1 100644 --- a/src/main/deploy/swerve/modules/backright.json +++ b/src/main/deploy/swerve/modules/backright.json @@ -6,17 +6,17 @@ "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax", - "id": 0, + "id": 3, "canbus": null }, "angle": { "type": "sparkmax", - "id": 0, + "id": 4, "canbus": null }, "encoder": { "type": "cancoder", - "id": 0, + "id": 5, "canbus": null }, "inverted": { diff --git a/src/main/deploy/swerve/modules/frontleft.json b/src/main/deploy/swerve/modules/frontleft.json index 018c523..5ac2369 100644 --- a/src/main/deploy/swerve/modules/frontleft.json +++ b/src/main/deploy/swerve/modules/frontleft.json @@ -6,17 +6,17 @@ "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax", - "id": 0, + "id": 6, "canbus": null }, "angle": { "type": "sparkmax", - "id": 0, + "id": 7, "canbus": null }, "encoder": { "type": "cancoder", - "id": 0, + "id": 8, "canbus": null }, "inverted": { diff --git a/src/main/deploy/swerve/modules/frontright.json b/src/main/deploy/swerve/modules/frontright.json index d3ccba2..50fccc3 100644 --- a/src/main/deploy/swerve/modules/frontright.json +++ b/src/main/deploy/swerve/modules/frontright.json @@ -6,17 +6,17 @@ "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax", - "id": 0, + "id": 9, "canbus": null }, "angle": { "type": "sparkmax", - "id": 0, + "id": 10, "canbus": null }, "encoder": { "type": "cancoder", - "id": 0, + "id": 11, "canbus": null }, "inverted": { diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index c3d6163..ed090c1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -22,7 +22,7 @@ public class RobotContainer { // drive.drive(manette.getLeftX(), manette.getLeftY(), manette.getRightX()); //},drive)); drive.setDefaultCommand(new RunCommand(()->{ - drive.drive(joystick1.getX(), -joystick1.getY(), joystick1.getZ()); + drive.drive(joystick1.getX(), -joystick1.getY(), -joystick1.getZ()); },drive)); } diff --git a/src/main/java/frc/robot/subsystems/Drive.java b/src/main/java/frc/robot/subsystems/Drive.java index 7337a17..637b22c 100644 --- a/src/main/java/frc/robot/subsystems/Drive.java +++ b/src/main/java/frc/robot/subsystems/Drive.java @@ -18,7 +18,7 @@ public class Drive extends SubsystemBase { File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(),"swerve"); public void drive(double x, double y, double zRotation){ - swerveDrive.drive(new Translation2d(x, y), zRotation, true, true); + swerveDrive.drive(new Translation2d(x, y), zRotation, true, false); }