Merge branch 'main' of https://git.demerso.net/PLS5618/pratique-2025
This commit is contained in:
commit
1a899887da
@ -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) {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user