From 7dad4be45cd7c61dc33dea8141d92e7dd3a1562e Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Mon, 27 Feb 2023 19:43:14 -0500 Subject: [PATCH] commit --- .../frc/robot/subsystems/BasePilotable.class | Bin 3529 -> 4602 bytes .../frc/robot/subsystems/BasePilotable.java | 9 +++++---- .../java/frc/robot/subsystems/Gratte.java | 15 ++++++++++++--- .../subsystems/bras/BrasTelescopique.java | 10 +++++++++- .../java/frc/robot/subsystems/bras/Pivot.java | 6 ++++-- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class index a1ecf8d0e5dc7b0fe12ec67cf110faf2ead1688a..6df957728ed1e778f8670725a67dc68d0729bc7f 100644 GIT binary patch literal 4602 zcmbVPX?q)26@JItSn?!w+@!=!)23}mWRYgDof1247F%ATMsAE1WZVK_B#rHfM>Aq( zWXGXEp+G6ng|(#YE&EpL)^^g;5+0yH*_SVT=Og_KJiK>CTU;r%D_gqvp1J4T_pJBK ztN(l9WdMiqFBuIIZkus3s$-{ZPjw4vcggkioU0CLu0COywx^{{T}G3H1A4ZgF6Iq& z#&BFu%uFMFu1C$-xtwNY)ntiTuu2GP3!3F+9oz6E>`ri(>gWspIY!1+V}ti3^O`e1 zuALu{(B^NR)e4z8vMQS67`meunYR>|rN_-hdViuOA~k1wwv(|f&#_H)Tr6V2!qlBH z$1db~U`v%SV}WO?b%bRdK30c~nHd7IJVP^w1%)EQX-AtcVcb`Teb_G0eo5QZE!)Tn zO?|G?>5ZPAmT;&JvpZLqnKAXWtvNJr)#8kn7CM;Pl3k#64{w$~;WJW1Xm-i5-He^5 z1p*(Is;*Yfw1cmhNa(A$fb3MdI|9z2|J^iDa|p&x=3vD<_uTD-ozV+ zYY}YT@G^4(RYXA-qQRjPg6L~7N()AYhvQu-p~D>twqR=*D!OI7o$K1MRVN%2^q^OS zv6IoVx*s7Dnkl_2#Z%5F^SYjuAk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7f>N=Xuk;|5wovJzl1h2E1*wv@ap;Rw-EN%4 zaN}QS8JvPKh4ERq(`XJE6M04=WSq}4+C#?0JfoA0OM?uyx$1AcI#|h7d*3WxpT_0< zmqg)9XYl0;zw8h)SNOX;i+83GC+jR-d4CEY^ZzV9oknkwcYO-iecn0p)(p<#%W13> z!c{Z)s+fvq;s|`+RrwuRM78Hg(GuPcDqoA w@A4@l0!5GVS2Pqfb8?QL6be@0dmgR85BQOEDOVPL!Y^&B`2;zO8*Quq2V@CzF8}}l 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); } }