diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class index a1ecf8d..6df9577 100644 Binary files a/bin/main/frc/robot/subsystems/BasePilotable.class and b/bin/main/frc/robot/subsystems/BasePilotable.class differ diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index 4243b3c..cf26a10 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -13,7 +13,9 @@ import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj.drive.DifferentialDrive; import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup; +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; @@ -32,6 +34,9 @@ public class BasePilotable extends SubsystemBase { private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche); //gyro ShuffleboardTab teb = Shuffleboard.getTab("teb"); + ShuffleboardLayout layout = Shuffleboard.getTab("teb") + .getLayout ("encodeurs base pilotable", BuiltInLayouts.kList) + .withSize(2, 2); private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();} public double getpitch() { return gyroscope.getPitch(); @@ -67,10 +72,6 @@ public void BrakeFerme(){ @Override public void periodic() { - teb .add("encodeuravantdroit",0.1); - teb .add("encodeurarrieregauche",0.1); - teb .add("encodeurarrieredroit",0.1); - teb .add("encodeuravantgauche",0.1); teb .add("distance",0.1); } } diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index e7e1cb6..8c5199a 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -12,13 +12,19 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import edu.wpi.first.wpilibj.DigitalInput; - - +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 frc.robot.Constants; public class Gratte extends SubsystemBase { +ShuffleboardTab teb = Shuffleboard.getTab("teb"); +ShuffleboardLayout layout = Shuffleboard.getTab("teb") +.getLayout("limitswitchsgratte", BuiltInLayouts.kList) +.withSize(2, 2); private WPI_TalonSRX Gratted = new WPI_TalonSRX(Constants.leverGratte); private WPI_TalonSRX Gratteg = new WPI_TalonSRX(Constants.baisserGratte); private DigitalInput limithd = new DigitalInput(Constants.limithd); @@ -51,6 +57,9 @@ public class Gratte extends SubsystemBase { } @Override public void periodic() { - // This method will be called once per scheduler run + limitswitchgratte.add ("limitbd", 0.1); + limitswitchgratte.add ("limithg", 0.1); + limitswitchgratte.add ("limithd", 0.1); + limitswitchgratte.add ("limitbg", 0.1); } } diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index 3f38ebc..797cc12 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -8,11 +8,19 @@ package frc.robot.subsystems.bras; 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 BrasTelescopique extends SubsystemBase { + +ShuffleboardTab teb = Shuffleboard.getTab("teb"); +ShuffleboardLayout layout = Shuffleboard.getTab("teb") +.getLayout("yeet", BuiltInLayouts.kList) +.withSize(2, 2); /** Creates a new BrasTelescopique. */ public BrasTelescopique() {} final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless); @@ -28,6 +36,6 @@ public class BrasTelescopique extends SubsystemBase { @Override public void periodic() { - Shuffleboard.getTab("SmartDashBoard") .add("winch",0.1); + yeet.add ("encodeur",0.1); } } diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index d9166ec..6e6e9c9 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -5,12 +5,14 @@ package frc.robot.subsystems.bras; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.SubsystemBase; import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; import static frc.robot.Constants.*; public class Pivot extends SubsystemBase { +ShuffleboardTab teb = Shuffleboard.getTab("teb"); // moteur private CANSparkMax pivot = new CANSparkMax(actuateur, MotorType.kBrushless); @@ -18,7 +20,7 @@ public class Pivot extends SubsystemBase { public void monteDescendre(double vitesse) { pivot.set (vitesse); } - // encoder + // encodeur public double distance(){ return (pivot.getEncoder().getPosition()); } @@ -27,6 +29,6 @@ public class Pivot extends SubsystemBase { } @Override public void periodic() { - Shuffleboard.getTab("SmartDashBoard") .add("pivot encodeur",0.1); + teb .add ("encodeur pivot",0.1); } }