From d4a47ec15798b8975731ed3415c1e9dc7cf787e6 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Mon, 20 Feb 2023 19:57:40 -0500 Subject: [PATCH] yrfjchn --- src/main/java/frc/robot/subsystems/BasePilotable.java | 11 +++++++++-- src/main/java/frc/robot/subsystems/bras/Pivot.java | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index 220799e..4243b3c 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -13,6 +13,8 @@ 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.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; @@ -24,10 +26,12 @@ public class BasePilotable extends SubsystemBase { final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit); final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche); final DifferentialDrive drive = new DifferentialDrive(gauche, droit); + //piston private DoubleSolenoid brakedroit = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakedroit, Constants.brakedroit); private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche); //gyro + ShuffleboardTab teb = Shuffleboard.getTab("teb"); private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();} public double getpitch() { return gyroscope.getPitch(); @@ -63,7 +67,10 @@ public void BrakeFerme(){ @Override public void periodic() { - // This method will be called once per scheduler run - + 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/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index e8d5dbb..d9166ec 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -4,6 +4,7 @@ package frc.robot.subsystems.bras; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj2.command.SubsystemBase; import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; @@ -26,6 +27,6 @@ public class Pivot extends SubsystemBase { } @Override public void periodic() { - // This method will be called once per scheduler run - } + Shuffleboard.getTab("SmartDashBoard") .add("pivot encodeur",0.1); + } }