From 3c4bbe7c68cc3c9c96777dbf35c5a9fafc49bd7f Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 14 Nov 2022 18:18:50 -0500 Subject: [PATCH 1/6] ef --- simgui-ds.json | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ simgui.json | 8 +++++ 2 files changed, 100 insertions(+) create mode 100644 simgui-ds.json create mode 100644 simgui.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/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" + } + } +} From 06543e325fbad04d3108214dc5697fb46174a3b4 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 14 Nov 2022 18:21:05 -0500 Subject: [PATCH 2/6] =?UTF-8?q?cr=C3=A9er=20le=20piston=20/shaker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/frc/robot/subsystem/pistonshaker.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/java/frc/robot/subsystem/pistonshaker.java diff --git a/src/main/java/frc/robot/subsystem/pistonshaker.java b/src/main/java/frc/robot/subsystem/pistonshaker.java new file mode 100644 index 0000000..0157b86 --- /dev/null +++ b/src/main/java/frc/robot/subsystem/pistonshaker.java @@ -0,0 +1,17 @@ +// 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.subsystem; + +import edu.wpi.first.wpilibj2.command.SubsystemBase; + +public class pistonshaker extends SubsystemBase { + /** Creates a new pistonshaker. */ + public pistonshaker() {} + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +} From bfdca95893ad817ce1c2c4767fd1fee7b46d12ac Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 14 Nov 2022 18:40:56 -0500 Subject: [PATCH 3/6] gcbvcnv --- .../Pistonshaker.java} | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) rename src/main/java/frc/robot/{subsystem/pistonshaker.java => subsystems/Pistonshaker.java} (56%) diff --git a/src/main/java/frc/robot/subsystem/pistonshaker.java b/src/main/java/frc/robot/subsystems/Pistonshaker.java similarity index 56% rename from src/main/java/frc/robot/subsystem/pistonshaker.java rename to src/main/java/frc/robot/subsystems/Pistonshaker.java index 0157b86..eadd140 100644 --- a/src/main/java/frc/robot/subsystem/pistonshaker.java +++ b/src/main/java/frc/robot/subsystems/Pistonshaker.java @@ -2,13 +2,19 @@ // 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.subsystem; +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 pistonshaker extends SubsystemBase { +public class Pistonshaker extends SubsystemBase { + private DoubleSolenoid shaker = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,0,1); /** Creates a new pistonshaker. */ - public pistonshaker() {} + + public Pistonshaker() { + + } @Override public void periodic() { From bd4103944cb2100a677a288da940675022ba426a Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 14 Nov 2022 18:52:36 -0500 Subject: [PATCH 4/6] qwerty --- src/main/java/frc/robot/Constants.java | 5 ++++- src/main/java/frc/robot/subsystems/Pistonshaker.java | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 033c72d..23ef642 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 pistonQuiShakef = 0; + public static final int pistonQuiShakeb = 1; +} diff --git a/src/main/java/frc/robot/subsystems/Pistonshaker.java b/src/main/java/frc/robot/subsystems/Pistonshaker.java index eadd140..d9eb538 100644 --- a/src/main/java/frc/robot/subsystems/Pistonshaker.java +++ b/src/main/java/frc/robot/subsystems/Pistonshaker.java @@ -7,9 +7,10 @@ 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 Pistonshaker extends SubsystemBase { - private DoubleSolenoid shaker = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,0,1); + private DoubleSolenoid shaker = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonQuiShakeb,Constants.pistonQuiShakef); /** Creates a new pistonshaker. */ public Pistonshaker() { From 8da918a7d2ab52ff5442835f9f446fc07fe2d1bd Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 14 Nov 2022 19:14:46 -0500 Subject: [PATCH 5/6] ngnhgcmvn --- src/main/java/frc/robot/Constants.java | 2 ++ src/main/java/frc/robot/subsystems/Pistonshaker.java | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 23ef642..5d2f693 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -4,6 +4,8 @@ package frc.robot; + + /** * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean * constants. This class should not be used for any other purpose. All constants should be declared diff --git a/src/main/java/frc/robot/subsystems/Pistonshaker.java b/src/main/java/frc/robot/subsystems/Pistonshaker.java index d9eb538..5599ac6 100644 --- a/src/main/java/frc/robot/subsystems/Pistonshaker.java +++ b/src/main/java/frc/robot/subsystems/Pistonshaker.java @@ -6,19 +6,27 @@ package frc.robot.subsystems; import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; +import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; public class Pistonshaker extends SubsystemBase { - private DoubleSolenoid shaker = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonQuiShakeb,Constants.pistonQuiShakef); + private DoubleSolenoid shaker = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonQuiShakef,Constants.pistonQuiShakeb); /** Creates a new pistonshaker. */ public Pistonshaker() { } - +public void sortirpiston() { + shaker.set(Value.kForward); +} +public void rentrerpiston() { + shaker.set(Value.kReverse); + } + @Override public void periodic() { + // This method will be called once per scheduler run } } From 883c6e5708f21d97f098ca308ec6a5b9315c56ec Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 14 Nov 2022 19:26:16 -0500 Subject: [PATCH 6/6] 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; + } +} + +