dsgfhfvjbg

This commit is contained in:
EdwardFaucher
2023-03-13 19:02:43 -04:00
parent e5756d0d5f
commit d1ac0f57da
3 changed files with 22 additions and 9 deletions

View File

@ -4,15 +4,22 @@
package frc.robot.commands.bras;
import java.util.function.DoubleSupplier;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.bras.BrasTelescopique;
public class BrasManuel extends CommandBase {
private BrasTelescopique brasTelescopique;
private DoubleSupplier doubleSupplier;
/** Creates a new BrasManuel. */
public BrasManuel(BrasTelescopique brasTelescopique) {
public BrasManuel(BrasTelescopique brasTelescopique,DoubleSupplier doubleSupplier) {
this.brasTelescopique = brasTelescopique;
this.doubleSupplier = doubleSupplier;
// Use addRequirements() here to declare subsystem dependencies.
addRequirements(brasTelescopique);
}
// Called when the command is initially scheduled.
@ -22,7 +29,7 @@ public class BrasManuel extends CommandBase {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
brasTelescopique.AvanceRecule(0.3);
brasTelescopique.AvanceRecule(doubleSupplier.getAsDouble());
}
// Called once the command ends or is interrupted.

View File

@ -4,14 +4,18 @@
package frc.robot.commands.bras;
import java.util.function.DoubleSupplier;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.bras.Pivot;
public class PivotManuel extends CommandBase {
private Pivot pivot;
private DoubleSupplier doubleSupplier;
/** Creates a new PivotManuel. */
public PivotManuel(Pivot pivot) {
public PivotManuel(Pivot pivot,double d) {
this.pivot = pivot;
// Use addRequirements() here to declare subsystem dependencies.
addRequirements(pivot);
}
@ -23,7 +27,7 @@ public class PivotManuel extends CommandBase {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
pivot.monteDescendre(0.3);
pivot.monteDescendre(doubleSupplier.getAsDouble());
}
// Called once the command ends or is interrupted.