debug de samedi

This commit is contained in:
samuel desharnais
2026-03-21 16:11:24 -04:00
parent e0c1e26933
commit a7fb3108ea
18 changed files with 178 additions and 150 deletions

View File

@@ -19,9 +19,9 @@ public class LancerBaseVitesse extends Command {
private Timer timer;
private double temp;
/** Creates a new Lancer. */
public LancerBaseVitesse(Lanceur lanceur, LimeLight3 limeLight3) {
public LancerBaseVitesse(Lanceur lanceur, Limelight3G limeLight3G) {
this.lanceur = lanceur;
// this.timer = new Timer();
this.timer = new Timer();
this.limeLight3G = new Limelight3G();
addRequirements(lanceur, limeLight3G);
//this.temp = 0;
@@ -32,8 +32,8 @@ public class LancerBaseVitesse extends Command {
@Override
public void initialize() {
pidController = new PIDController(0.0007, 0,0, 0.001);
//timer.reset();
//timer.start();
timer.reset();
timer.start();
//temp = lanceur.Amp();
}
@@ -62,9 +62,9 @@ public class LancerBaseVitesse extends Command {
double vitesse = lanceur.vitesseDemander();
double output = pidController.calculate(lanceur.Vitesse(),vitesse);
lanceur.Lancer(output);
if(lanceur.Vitesse() >= 1200){
lanceur.Demeler(0.5);
}
if(timer.get() >1){
lanceur.Demeler(1);
}
// }
}
@@ -74,6 +74,8 @@ public class LancerBaseVitesse extends Command {
public void end(boolean interrupted) {
lanceur.Demeler(0);
lanceur.Lancer(0);
timer.reset();
timer.stop();
}
// Returns true when the command should end.