Code composante fini

This commit is contained in:
Samuel
2026-02-03 19:26:06 -05:00
parent 50a686a5d6
commit 952545efae
11 changed files with 1749 additions and 20 deletions

View File

@@ -6,7 +6,6 @@ package frc.robot.subsystems;
import com.revrobotics.spark.SparkFlex;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import com.revrobotics.spark.config.SparkMaxConfig;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
@@ -14,11 +13,9 @@ public class Lanceur extends SubsystemBase {
SparkFlex moteur1 = new SparkFlex(2, MotorType.kBrushless);
SparkFlex moteur2 = new SparkFlex(3, MotorType.kBrushless);
SparkFlex Demeleur = new SparkFlex(4, MotorType.kBrushless);
SparkMaxConfig slaveConfig = new SparkMaxConfig();
public void Lancer(double vitesse){
moteur1.set(vitesse);
slaveConfig.follow(moteur1, true);
moteur2.configure(slaveConfig,null,null);
moteur2.set(-vitesse);
}
public void Demeler(double vitesse){
Demeleur.set(vitesse);