From 03e342a0a033e96859d270b1d64211b91210233d Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Thu, 18 Jan 2024 19:36:16 -0500 Subject: [PATCH] 2e moteur lanceur --- src/main/java/frc/robot/Constants.java | 5 +++-- src/main/java/frc/robot/subsystem/Lanceur.java | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 4cdef4b..3086947 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -8,6 +8,7 @@ package frc.robot; public class Constants { //moteur public static int lanceur = 1; - public static int roue = 2; - public static int etoile = 3; + public static int lanceur2 = 2; + public static int roue = 3; + public static int etoile = 4; } diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index ff2047a..d869035 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -17,10 +17,13 @@ public class Lanceur extends SubsystemBase { public Lanceur() {} final CANSparkMax lancer = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); - final CANSparkMax lancer2 = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); + final CANSparkMax lancer2 = new CANSparkMax(Constants.lanceur2, MotorType.kBrushless); public void lancer(double vitesse){ lancer.set(vitesse); } + public void lanceur(){ + lancer2.follow(lancer); + }