From 4d2dc50b03b072bd0d78f080fc644829480ea609 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Thu, 18 Jan 2024 20:02:00 -0500 Subject: [PATCH] acc et baleeu --- src/main/java/frc/robot/Constants.java | 5 +++-- src/main/java/frc/robot/subsystem/Accumulateur.java | 8 ++++++-- src/main/java/frc/robot/subsystem/Balayeuse.java | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index d3cda37..04fe6fa 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -11,6 +11,7 @@ public class Constants { public static int lancer2 = 2; public static int roue = 3; public static int etoile = 4; - public static int Deaccumulationneur1 = 5; - public static int Deaccumulationneur2 = 6; + public static int Moteuracc2 = 5; + public static int Moteuracc = 6; + } diff --git a/src/main/java/frc/robot/subsystem/Accumulateur.java b/src/main/java/frc/robot/subsystem/Accumulateur.java index 13271ad..71e9274 100644 --- a/src/main/java/frc/robot/subsystem/Accumulateur.java +++ b/src/main/java/frc/robot/subsystem/Accumulateur.java @@ -6,14 +6,18 @@ package frc.robot.subsystem; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; +import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; public class Accumulateur extends SubsystemBase { /** Creates a new Accumulateur. */ public Accumulateur() {} - final WPI_TalonSRX Deaccumulationneur1 = new WPI_TalonSRX(Constants.Deaccumulationneur1); - final WPI_TalonSRX Deaccumulationneur2 = new WPI_TalonSRX(Constants.Deaccumulationneur2); + final WPI_TalonSRX Moteuracc2 = new WPI_TalonSRX(Constants.Moteuracc2); + final WPI_TalonSRX Moteuracc = new WPI_TalonSRX(Constants.Moteuracc); + final DigitalInput limitacc = new DigitalInput(0); + public void Deaccumuler(double vitesse){Moteuracc2.set(vitesse);} + @Override public void periodic() { diff --git a/src/main/java/frc/robot/subsystem/Balayeuse.java b/src/main/java/frc/robot/subsystem/Balayeuse.java index f2f2f26..b18f7ee 100644 --- a/src/main/java/frc/robot/subsystem/Balayeuse.java +++ b/src/main/java/frc/robot/subsystem/Balayeuse.java @@ -15,7 +15,7 @@ public class Balayeuse extends SubsystemBase { /** Creates a new Balayeuse. */ public Balayeuse() {} - final WPI_TalonSRX roue = new WPI_TalonSRX(Constants.roue); + final WPI_TalonSRX roue = new WPI_TalonSRX(Constants.roue); final TalonSRX etoile = new TalonSRX(Constants.etoile); public void Accumulation(double vitesse){