From ee2c15b63f1de99c93fcf7a5afd8e510bcb5a47b Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Thu, 18 Jan 2024 19:33:53 -0500 Subject: [PATCH] balayeuses --- src/main/java/frc/robot/Constants.java | 2 ++ src/main/java/frc/robot/subsystem/Balayeuse.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 947e0ab..4cdef4b 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -8,4 +8,6 @@ package frc.robot; public class Constants { //moteur public static int lanceur = 1; + public static int roue = 2; + public static int etoile = 3; } diff --git a/src/main/java/frc/robot/subsystem/Balayeuse.java b/src/main/java/frc/robot/subsystem/Balayeuse.java index c541879..1304a05 100644 --- a/src/main/java/frc/robot/subsystem/Balayeuse.java +++ b/src/main/java/frc/robot/subsystem/Balayeuse.java @@ -9,13 +9,14 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import com.revrobotics.CANSparkMax; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Constants; public class Balayeuse extends SubsystemBase { /** Creates a new Balayeuse. */ public Balayeuse() {} - final WPI_TalonSRX Moteur = new WPI_TalonSRX(0); - final TalonSRX Moteur2 = new TalonSRX(1); + final WPI_TalonSRX Moteur = new WPI_TalonSRX(Constants.Moteur); + final TalonSRX Moteur2 = new TalonSRX(Constants.Moteur2); public void Accumulation(double vitesse){ Moteur.set(vitesse);