From 10bdfe9ba33d56031a77c0c66c2826af6190fa7d Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 20 Mar 2023 18:41:04 -0400 Subject: [PATCH 1/3] ui --- src/main/java/frc/robot/RobotContainer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 4ba220d..dbdc515 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -118,6 +118,7 @@ public RobotContainer() { } private void configureBindings() { // manette 1 + //y lumiere limelight, manuel 2e joystik, manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); manette1.leftBumper().toggleOnTrue(aprilTag); From c121ff5ec0db05d3c842b5f9ae30086e889d4e01 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Mon, 20 Mar 2023 18:47:03 -0400 Subject: [PATCH 2/3] dgbv n --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- src/main/java/frc/robot/commands/bras/BrasManuel.java | 6 ++++-- src/main/java/frc/robot/commands/bras/PivotManuel.java | 8 ++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 4efd8e3..6d85b4b 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -88,8 +88,8 @@ public class RobotContainer { Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY()); Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY()); Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY()); - PivotManuel pivotManuel = new PivotManuel(pivot, manette2::getLeftX); - BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette2::getLeftY); + PivotManuel pivotManuel = new PivotManuel(pivot, manette2::getRightY); + BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette2::getLeftX); public RobotContainer() { chooser.addOption(enhaut, enhaut); diff --git a/src/main/java/frc/robot/commands/bras/BrasManuel.java b/src/main/java/frc/robot/commands/bras/BrasManuel.java index 844c681..25343bd 100644 --- a/src/main/java/frc/robot/commands/bras/BrasManuel.java +++ b/src/main/java/frc/robot/commands/bras/BrasManuel.java @@ -30,9 +30,11 @@ public class BrasManuel extends CommandBase { @Override public void execute() { if(doubleSupplier.getAsDouble()>0.2 || doubleSupplier.getAsDouble()<-0.2){ - brasTelescopique.AvanceRecule(doubleSupplier.getAsDouble()); + brasTelescopique.AvanceRecule(doubleSupplier.getAsDouble()*0.5); } - + else{ + brasTelescopique.AvanceRecule(0); + } } // Called once the command ends or is interrupted. diff --git a/src/main/java/frc/robot/commands/bras/PivotManuel.java b/src/main/java/frc/robot/commands/bras/PivotManuel.java index 32979d0..a802781 100644 --- a/src/main/java/frc/robot/commands/bras/PivotManuel.java +++ b/src/main/java/frc/robot/commands/bras/PivotManuel.java @@ -28,9 +28,13 @@ public class PivotManuel extends CommandBase { @Override public void execute() { if(doubleSupplier.getAsDouble()>0.2 || doubleSupplier.getAsDouble()<-0.2){ - pivot.monteDescendre(doubleSupplier.getAsDouble());} + pivot.monteDescendre(-doubleSupplier.getAsDouble()*0.5) + ;} + else{ + pivot.monteDescendre(0); + } } - + // Called once the command ends or is interrupted. @Override public void end(boolean interrupted) {} From 627b365cdad192e7d26085dc97ae0a75fb05eb76 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Mon, 20 Mar 2023 18:49:15 -0400 Subject: [PATCH 3/3] gxb --- src/main/java/frc/robot/RobotContainer.java | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index d50e4e5..908d820 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -88,8 +88,8 @@ public class RobotContainer { Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY()); Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY()); Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY()); - PivotManuel pivotManuel = new PivotManuel(pivot, manette2::getRightY); - BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette2::getLeftX); + PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getLeftY); + BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getLeftX); public RobotContainer() { chooser.addOption(enhaut, enhaut); @@ -108,20 +108,20 @@ public class RobotContainer { private void configureBindings() { // manette 1 - //y lumiere limelight, manuel 2e joystik, - manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); - manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); - manette1.leftBumper().toggleOnTrue(aprilTag); - manette1.rightBumper().toggleOnTrue(tape); - manette1.povUp().whileTrue(pivoteBrasHaut); - manette1.povDown().whileTrue(pivoteBrasBas); - manette1.povRight().whileTrue(pivoteBrasMilieux); - manette1.povLeft().whileTrue(pivotBrasRentre); - //manette 2 - manette2.povDown().onTrue(pivotChercheBas); - manette2.povUp().onTrue(pivotChercheHaut); - manette2.rightBumper().toggleOnTrue(cube); - manette2.leftBumper().toggleOnTrue(cone); + manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer, pince)); + manette1.x().onTrue(brakeOuvre); + manette1.b().onTrue(brakeFerme); + manette1.leftBumper().whileTrue(aprilTag); + manette1.rightBumper().whileTrue(tape); + manette1.povUp().whileTrue(creerCommandBras(51, -40)); + manette1.povDown().whileTrue(creerCommandBras(9, -14)); + manette1.povRight().whileTrue(creerCommandBras(44, -17)); + manette1.povLeft().whileTrue(creerCommandBras(0, 0)); + // manette 2 + manette2.povDown().onTrue(creerCommandBras(9, -18)); + manette2.povUp().onTrue(creerCommandBras(44, 0)); + manette2.rightBumper().whileTrue(cube); + manette2.leftBumper().whileTrue(cone); manette2.y().whileTrue(gyro); manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro)); manette2.a().whileTrue(gratteMonte);