diff --git a/src/main/java/frc/robot/Subsystems/Lanceur.java b/src/main/java/frc/robot/Subsystems/Lanceur.java index 1a6c4a6..b13621d 100644 --- a/src/main/java/frc/robot/Subsystems/Lanceur.java +++ b/src/main/java/frc/robot/Subsystems/Lanceur.java @@ -22,19 +22,20 @@ public class Lanceur extends SubsystemBase { final WPI_TalonSRX lanceur1 = new WPI_TalonSRX(0); final WPI_TalonSRX lanceur2 = new WPI_TalonSRX(1); - final CANSparkMax tourel = new CANSparkMax(2, MotorType.kBrushed); + final CANSparkMax tourelle = new CANSparkMax(2, MotorType.kBrushed); public void encodeur(double distance){ lanceur1.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative); lanceur2.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative); lanceur1.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1); lanceur2.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1); + lanceur1.configFactoryDefault(); } public void lance(double vitesse){ lanceur1.set(vitesse); lanceur2.set(-vitesse); } public void tourelRotation(double vitesse){ - tourel.set(vitesse); + tourelle.set(vitesse); } public void setPID(double p, double i, int d) { }