2e moteur lanceur

This commit is contained in:
samuel desharnais 2024-01-18 19:36:16 -05:00
parent 1738953740
commit 03e342a0a0
2 changed files with 7 additions and 3 deletions

View File

@ -8,6 +8,7 @@ package frc.robot;
public class Constants { public class Constants {
//moteur //moteur
public static int lanceur = 1; public static int lanceur = 1;
public static int roue = 2; public static int lanceur2 = 2;
public static int etoile = 3; public static int roue = 3;
public static int etoile = 4;
} }

View File

@ -17,10 +17,13 @@ public class Lanceur extends SubsystemBase {
public Lanceur() {} public Lanceur() {}
final CANSparkMax lancer = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); 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){ public void lancer(double vitesse){
lancer.set(vitesse); lancer.set(vitesse);
} }
public void lanceur(){
lancer2.follow(lancer);
}