From 4c00d739a05c7a6118518d452eaa5fe1e857a895 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Mon, 14 Nov 2022 18:42:35 -0500 Subject: [PATCH 1/5] jsg --- simgui-ds.json | 92 +++++++++++++++++++ simgui.json | 8 ++ .../java/frc/robot/subsystems/Pousser.java | 20 ++++ 3 files changed, 120 insertions(+) create mode 100644 simgui-ds.json create mode 100644 simgui.json create mode 100644 src/main/java/frc/robot/subsystems/Pousser.java 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/simgui.json b/simgui.json new file mode 100644 index 0000000..3eb1897 --- /dev/null +++ b/simgui.json @@ -0,0 +1,8 @@ +{ + "NTProvider": { + "types": { + "/FMSInfo": "FMSInfo", + "/LiveWindow/Ungrouped/Scheduler": "Scheduler" + } + } +} diff --git a/src/main/java/frc/robot/subsystems/Pousser.java b/src/main/java/frc/robot/subsystems/Pousser.java new file mode 100644 index 0000000..5627d26 --- /dev/null +++ b/src/main/java/frc/robot/subsystems/Pousser.java @@ -0,0 +1,20 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc.robot.subsystems; + +import edu.wpi.first.wpilibj.DoubleSolenoid; +import edu.wpi.first.wpilibj.PneumaticsModuleType; +import edu.wpi.first.wpilibj2.command.SubsystemBase; + +public class Pousser extends SubsystemBase { + private DoubleSolenoid pousser = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,0,1); + /** Creates a new Pousser. */ + public Pousser() {} + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +} From aaf5c7c033968366a459fead8e0657c94dcb73ad Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Mon, 14 Nov 2022 18:51:31 -0500 Subject: [PATCH 2/5] adf --- src/main/java/frc/robot/Constants.java | 5 ++++- src/main/java/frc/robot/subsystems/Pousser.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 033c72d..c137333 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -12,4 +12,7 @@ package frc.robot; *

It is advised to statically import this class (or one of its inner classes) wherever the * constants are needed, to reduce verbosity. */ -public final class Constants {} +public final class Constants { + public static final int PistonPousserR = 0; + public static final int PistonPousserF = 1; +} diff --git a/src/main/java/frc/robot/subsystems/Pousser.java b/src/main/java/frc/robot/subsystems/Pousser.java index 5627d26..2c3b985 100644 --- a/src/main/java/frc/robot/subsystems/Pousser.java +++ b/src/main/java/frc/robot/subsystems/Pousser.java @@ -9,6 +9,7 @@ import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj2.command.SubsystemBase; public class Pousser extends SubsystemBase { + private DoubleSolenoid pousser = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,0,1); /** Creates a new Pousser. */ public Pousser() {} From 883c6e5708f21d97f098ca308ec6a5b9315c56ec Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 14 Nov 2022 19:26:16 -0500 Subject: [PATCH 3/5] creer commande --- .../frc/robot/commands/Activer_poussoir.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/main/java/frc/robot/commands/Activer_poussoir.java diff --git a/src/main/java/frc/robot/commands/Activer_poussoir.java b/src/main/java/frc/robot/commands/Activer_poussoir.java new file mode 100644 index 0000000..f40f96f --- /dev/null +++ b/src/main/java/frc/robot/commands/Activer_poussoir.java @@ -0,0 +1,34 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc.robot.commands; + +import edu.wpi.first.wpilibj2.command.CommandBase; + +public class Activer_poussoir extends CommandBase { + /** Creates a new Activer_poussoir. */ + public Activer_poussoir() { + // Use addRequirements() here to declare subsystem dependencies. + } + + // Called when the command is initially scheduled. + @Override + public void initialize() {} + + // Called every time the scheduler runs while the command is scheduled. + @Override + public void execute() {} + + // Called once the command ends or is interrupted. + @Override + public void end(boolean interrupted) {} + + // Returns true when the command should end. + @Override + public boolean isFinished() { + return false; + } +} + + From 1887e39bed79c9b084efe6c6e09adddff8a59505 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Mon, 14 Nov 2022 19:26:53 -0500 Subject: [PATCH 4/5] aet --- src/main/java/frc/robot/subsystems/Pousser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/Pousser.java b/src/main/java/frc/robot/subsystems/Pousser.java index 2c3b985..e619dad 100644 --- a/src/main/java/frc/robot/subsystems/Pousser.java +++ b/src/main/java/frc/robot/subsystems/Pousser.java @@ -7,10 +7,11 @@ package frc.robot.subsystems; import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Constants; public class Pousser extends SubsystemBase { - private DoubleSolenoid pousser = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,0,1); + private DoubleSolenoid pousser = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.PistonPousserR,Constants.PistonPousserF ); /** Creates a new Pousser. */ public Pousser() {} From 6de777002554c4de5a8b12deda4815042679bb11 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Mon, 14 Nov 2022 19:40:18 -0500 Subject: [PATCH 5/5] cmd --- .../{Pousser.java => Poussoir.java} | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) rename src/main/java/frc/robot/subsystems/{Pousser.java => Poussoir.java} (72%) diff --git a/src/main/java/frc/robot/subsystems/Pousser.java b/src/main/java/frc/robot/subsystems/Poussoir.java similarity index 72% rename from src/main/java/frc/robot/subsystems/Pousser.java rename to src/main/java/frc/robot/subsystems/Poussoir.java index e619dad..7774e23 100644 --- a/src/main/java/frc/robot/subsystems/Pousser.java +++ b/src/main/java/frc/robot/subsystems/Poussoir.java @@ -9,11 +9,27 @@ import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; -public class Pousser extends SubsystemBase { +public class Poussoir extends SubsystemBase { + private DoubleSolenoid pousser = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.PistonPousserR,Constants.PistonPousserF ); + + /** Creates a new Poussoir. */ + public Poussoir() { + + } + + public void pousser(){ + + } + public void bloquer(){ + + } + public void debloque(){ + + } + public void tirer(){ + + } - private DoubleSolenoid pousser = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.PistonPousserR,Constants.PistonPousserF ); - /** Creates a new Pousser. */ - public Pousser() {} @Override public void periodic() {