From 210d2197930a06606d7e578b4c0c515ee4b34f17 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 3 Feb 2025 17:49:34 -0500 Subject: [PATCH] simulation --- simgui-ds.json | 92 +++++++++++++++++++ src/main/java/frc/robot/RobotContainer.java | 2 +- .../java/frc/robot/subsystems/Elevateur.java | 4 +- .../java/frc/robot/subsystems/Grimpeur.java | 4 +- 4 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 simgui-ds.json diff --git a/simgui-ds.json b/simgui-ds.json new file mode 100644 index 0000000..73cc713 --- /dev/null +++ b/simgui-ds.json @@ -0,0 +1,92 @@ +{ + "keyboardJoysticks": [ + { + "axisConfig": [ + { + "decKey": 65, + "incKey": 68 + }, + { + "decKey": 87, + "incKey": 83 + }, + { + "decKey": 69, + "decayRate": 0.0, + "incKey": 82, + "keyRate": 0.009999999776482582 + } + ], + "axisCount": 3, + "buttonCount": 4, + "buttonKeys": [ + 90, + 88, + 67, + 86 + ], + "povConfig": [ + { + "key0": 328, + "key135": 323, + "key180": 322, + "key225": 321, + "key270": 324, + "key315": 327, + "key45": 329, + "key90": 326 + } + ], + "povCount": 1 + }, + { + "axisConfig": [ + { + "decKey": 74, + "incKey": 76 + }, + { + "decKey": 73, + "incKey": 75 + } + ], + "axisCount": 2, + "buttonCount": 4, + "buttonKeys": [ + 77, + 44, + 46, + 47 + ], + "povCount": 0 + }, + { + "axisConfig": [ + { + "decKey": 263, + "incKey": 262 + }, + { + "decKey": 265, + "incKey": 264 + } + ], + "axisCount": 2, + "buttonCount": 6, + "buttonKeys": [ + 260, + 268, + 266, + 261, + 269, + 267 + ], + "povCount": 0 + }, + { + "axisCount": 0, + "buttonCount": 0, + "povCount": 0 + } + ] +} diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index fbb1cd2..0cd68f6 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -31,7 +31,7 @@ import frc.robot.subsystems.Pince; public class RobotContainer { CommandXboxController manette1 = new CommandXboxController(0); - CommandXboxController manette2 = new CommandXboxController(0); + CommandXboxController manette2 = new CommandXboxController(1); private final SendableChooser autoChooser; Pince pince = new Pince(); Elevateur elevateur = new Elevateur(); diff --git a/src/main/java/frc/robot/subsystems/Elevateur.java b/src/main/java/frc/robot/subsystems/Elevateur.java index b37f6f0..8caad7a 100644 --- a/src/main/java/frc/robot/subsystems/Elevateur.java +++ b/src/main/java/frc/robot/subsystems/Elevateur.java @@ -11,8 +11,8 @@ import com.revrobotics.spark.SparkLowLevel.MotorType; public class Elevateur extends SubsystemBase { /** Creates a new Elevateur. */ public Elevateur() {} - final SparkMax monte = new SparkMax(0, MotorType.kBrushless); - final DigitalInput limit2 = new DigitalInput(0); + final SparkMax monte = new SparkMax(3, MotorType.kBrushless); + final DigitalInput limit2 = new DigitalInput(1); public double position(){ return monte.getEncoder().getPosition(); } diff --git a/src/main/java/frc/robot/subsystems/Grimpeur.java b/src/main/java/frc/robot/subsystems/Grimpeur.java index 7e55e0b..14b4fb1 100644 --- a/src/main/java/frc/robot/subsystems/Grimpeur.java +++ b/src/main/java/frc/robot/subsystems/Grimpeur.java @@ -11,8 +11,8 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase; public class Grimpeur extends SubsystemBase { /** Creates a new Grimpeur. */ public Grimpeur() {} - final Spark grimpeur = new Spark(0); - final DigitalInput limit1 = new DigitalInput(0); + final Spark grimpeur = new Spark(2); + final DigitalInput limit1 = new DigitalInput(3); public void grimpe(double vitesse){ grimpeur.set(vitesse); }