This commit is contained in:
Olivier Dubois 2024-02-17 13:48:04 -05:00
commit 9ad60cd09b
2 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ public class LancerNote extends Command {
// Called every time the scheduler runs while the command is scheduled. // Called every time the scheduler runs while the command is scheduled.
@Override @Override
public void execute() { public void execute() {
double vitesse = 0.5; double vitesse = 0.8;
lancer.lancerspeaker(); lancer.lancerspeaker();
if(lancer.vitesse(vitesse)>vitesse){ if(lancer.vitesse(vitesse)>vitesse){
accumulateur.Accumuler(); accumulateur.Accumuler();
@ -39,7 +39,7 @@ public class LancerNote extends Command {
// Called once the command ends or is interrupted. // Called once the command ends or is interrupted.
@Override @Override
public void end(boolean interrupted) { public void end(boolean interrupted) {
lancer.vitesse(0); lancer.lancer(0);
accumulateur.Accumuler(0); accumulateur.Accumuler(0);
} }

View File

@ -16,12 +16,12 @@ public class Lanceur extends SubsystemBase {
/** Creates a new Lanceur. */ /** Creates a new Lanceur. */
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
private GenericEntry vitesse = private GenericEntry vitesse =
dashboard.add("vitesse", 0.5) dashboard.add("vitesse", 0.8)
.withSize(1, 1) .withSize(1, 1)
.withPosition(3, 3) .withPosition(3, 3)
.getEntry(); .getEntry();
private GenericEntry vitesseamp = private GenericEntry vitesseamp =
dashboard.add("vitesseamp", 0.4) dashboard.add("vitesseamp", 0.1)
.withSize(1, 1) .withSize(1, 1)
.withPosition(3, 4) .withPosition(3, 4)
.getEntry(); .getEntry();
@ -42,13 +42,13 @@ public class Lanceur extends SubsystemBase {
lanceur4.set(-vitesse); lanceur4.set(-vitesse);
} }
public void lancerspeaker(){ public void lancerspeaker(){
lancer(vitesse.getDouble(0.5)); lancer(vitesse.getDouble(0.8));
} }
public void lanceramp(){ public void lanceramp(){
lancer(vitesseamp.getDouble(0.4)); lancer(vitesseamp.getDouble(0.1));
} }
public double vitesse(double vitesse){ public double vitesse(double vitesse){
return lanceur1.getEncoder().getVelocity(); return lanceur3.getEncoder().getVelocity();
} }
public void lanceur(){ public void lanceur(){