This commit is contained in:
samuel desharnais 2024-10-30 19:14:16 -04:00
parent fc75e1f997
commit 205da73570
2 changed files with 12 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,14 +30,23 @@ public class Lanceur extends SubsystemBase {
lanceur2.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1); lanceur2.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1);
} }
public void masterslave(){
lanceur2.follow(lanceur1);
lanceur2.setInverted(true);
}
public void lance(double vitesse){ public void lance(double vitesse){
lanceur1.set(vitesse); lanceur1.set(vitesse);
lanceur2.set(-vitesse);
} }
public void tourelRotation(double vitesse){ public void tourelRotation(double vitesse){
tourelle.set(vitesse); tourelle.set(vitesse);
} }
public void setPID(double p, double i, int d) { public double distancetourel(){
return(tourelle.getEncoder().getPosition());
}
public void PIDlanceur(double p, double i, double d) {
lanceur1.config_kP(0, p);
lanceur1.config_kI(0, i);
lanceur1.config_kD(0, d);
} }
@Override @Override
public void periodic() { public void periodic() {