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); + }