diff --git a/src/main/java/frc/robot/commands/Avancer.java b/src/main/java/frc/robot/commands/Avancer.java index 476601e..69e0047 100644 --- a/src/main/java/frc/robot/commands/Avancer.java +++ b/src/main/java/frc/robot/commands/Avancer.java @@ -4,13 +4,25 @@ package frc.robot.commands; +import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.CommandBase; import frc.robot.subsystems.Drive; public class Avancer extends CommandBase { private Drive drive; + ShuffleboardTab dashboard = Shuffleboard.getTab("Dashboard"); + ShuffleboardLayout avancer = Shuffleboard.getTab("Dashboard") + .getLayout("Avancer", BuiltInLayouts.kList) + .withSize(3, 3); /** Creates a new Avancer. */ public Avancer(Drive drive) { + avancer.add("x", 1); + avancer.add("y", 2); + avancer.add("z", 3); + this.drive = drive; addRequirements(drive); // Use addRequirements() here to declare subsystem dependencies. diff --git a/src/main/java/frc/robot/commands/Reculer.java b/src/main/java/frc/robot/commands/Reculer.java index 9d67460..a075f23 100644 --- a/src/main/java/frc/robot/commands/Reculer.java +++ b/src/main/java/frc/robot/commands/Reculer.java @@ -4,13 +4,24 @@ package frc.robot.commands; +import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.CommandBase; import frc.robot.subsystems.Drive; public class Reculer extends CommandBase { private Drive drive; + ShuffleboardTab dashboard = Shuffleboard.getTab("Dashboard"); + ShuffleboardLayout reculer = Shuffleboard.getTab("Dashboard") + .getLayout("Reculer", BuiltInLayouts.kList) + .withSize(3, 3); /** Creates a new Reculer. */ public Reculer(Drive drive) { + reculer.add("x", 1); + reculer.add("y", 2); + reculer.add("z", 3); this.drive = drive; addRequirements(drive); // Use addRequirements() here to declare subsystem dependencies. diff --git a/src/main/java/frc/robot/subsystems/Lanceur.java b/src/main/java/frc/robot/subsystems/Lanceur.java index 1a26f5f..929fed9 100644 --- a/src/main/java/frc/robot/subsystems/Lanceur.java +++ b/src/main/java/frc/robot/subsystems/Lanceur.java @@ -7,12 +7,23 @@ package frc.robot.subsystems; import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; +import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; public class Lanceur extends SubsystemBase { - - public Lanceur(){} + ShuffleboardTab dashboard = Shuffleboard.getTab("Dashboard"); + ShuffleboardLayout pid = Shuffleboard.getTab("Dashboard") + .getLayout("Pid", BuiltInLayouts.kList) + .withSize(3, 7); + public Lanceur(){ + pid.add("p", 1); + pid.add("i", 2); + pid.add("d", 3); + } final CANSparkMax lanceur = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); public void lancer(double vitesse){