Merge branch 'main' of https://demerso.net/pls5618/2023/robot
This commit is contained in:
commit
569fbce96b
@ -88,8 +88,8 @@ public class RobotContainer {
|
|||||||
Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY());
|
Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY());
|
||||||
Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY());
|
Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY());
|
||||||
Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY());
|
Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY());
|
||||||
PivotManuel pivotManuel = new PivotManuel(pivot, manette2::getLeftX);
|
PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getLeftY);
|
||||||
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette2::getLeftY);
|
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getLeftX);
|
||||||
|
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
chooser.addOption(enhaut, enhaut);
|
chooser.addOption(enhaut, enhaut);
|
||||||
|
@ -30,9 +30,11 @@ public class BrasManuel extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if(doubleSupplier.getAsDouble()>0.2 || doubleSupplier.getAsDouble()<-0.2){
|
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.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -28,7 +28,11 @@ public class PivotManuel extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if(doubleSupplier.getAsDouble()>0.2 || doubleSupplier.getAsDouble()<-0.2){
|
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.
|
// Called once the command ends or is interrupted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user