This commit is contained in:
Antoine PerreaultE 2024-03-27 17:34:57 -04:00
parent 5fcd2750b4
commit 966b85d07b
7 changed files with 9 additions and 18 deletions

View File

@ -70,10 +70,6 @@ public class RobotContainer {
public RobotContainer() {
dashboard.addCamera("limelight", "limelight","limelight.local:5800")
.withSize(3,4)
.withPosition(7,0);
dashboard.addCamera("USB Camera 0", "USB Camera 0","http://roborio-5618-frc.local:1181/?action=stream")
.withSize(4, 3)
.withPosition(3, 0);
@ -93,11 +89,6 @@ public class RobotContainer {
joystick.button(3).whileTrue(new Balayer(balayeuse, accumulateur));
joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur));
joystick.button(5).whileTrue(new LancerAmp(lanceur, accumulateur));
joystick.button(4).whileTrue(new ParallelCommandGroup(new Lancer(lanceur,limelight),new Limelight_tracker(limelight,drive)));
joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive)));
joystick.button(6).whileTrue(new LancerTrape(lanceur, accumulateur));
joystick.button(7).whileTrue(new Limelight_tracker(limelight, drive));
joystick.button(8).whileTrue(new Debalayer(balayeuse, accumulateur));
// deplacement
configureBindings();

View File

@ -29,7 +29,7 @@ public class Balayer extends Command {
accumulateur.Accumuler(0);
}
else{
balayeuse.balaye(0.55);
balayeuse.balaye(0.9);
accumulateur.Accumuler();
}
}

View File

@ -27,7 +27,7 @@ public class LancerAmp extends Command {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
double vitesse = 0.3;
double vitesse = 0.4;
lancer.lanceramp();
if(lancer.vitesse(vitesse)>vitesse){
accumulateur.Accumuler();

View File

@ -28,9 +28,9 @@ public class LancerNote extends Command {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
double vitesse = 0.8;
double vitesse = 1;
lancer.lancerspeaker();
if(lancer.vitesse(vitesse)>0.9999999999999999999999999999999999999999999999999999999){
if(lancer.vitesse(vitesse)>0.999999999999999999999999999999999999999999999999999){
accumulateur.Accumuler();
}
else{

View File

@ -18,7 +18,7 @@ public class Accumulateur extends SubsystemBase {
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
private GenericEntry vitesse =
dashboard.add("vitesseacc", 0.7)
dashboard.add("vitesseacc", 0.9)
.withSize(1, 1)
.withPosition(0, 0)
.getEntry();
@ -41,7 +41,7 @@ public class Accumulateur extends SubsystemBase {
Moteuracc2.set(-vitesse);
}
public void Accumuler(){
Accumuler(vitesse.getDouble(0.7));
Accumuler(vitesse.getDouble(0.9));
}
@Override

View File

@ -28,7 +28,7 @@ public class Drive extends SubsystemBase {
public AHRS Gyro = new AHRS();
public void drive(double x, double y, double zRotation){
swerveDrive.drive(new Translation2d(x*5, y*5), zRotation*4, false, false);
swerveDrive.drive(new Translation2d(x*6, y*6), zRotation*5, false, false);
}
public Drive() {

View File

@ -26,12 +26,12 @@ public class Lanceur extends SubsystemBase {
/** Creates a new Lanceur. */
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
private GenericEntry vitesse =
dashboard.add("vitesse", 0.9)
dashboard.add("vitesse", 1)
.withSize(1, 1)
.withPosition(2,0)
.getEntry();
private GenericEntry vitesseamp =
dashboard.add("vitesseamp", 0.3)
dashboard.add("vitesseamp", 0.25)
.withSize(1, 1)
.withPosition(1,0)
.getEntry();