modif debug
This commit is contained in:
@ -37,6 +37,6 @@ public class BrakeFerme extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public class BrakeOuvre extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class Reculer extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
basePilotable.drive(-0.3,0);
|
||||
basePilotable.drive(-0.5,0);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -29,7 +29,10 @@ public class BrasManuel extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
brasTelescopique.AvanceRecule(doubleSupplier.getAsDouble());
|
||||
if(doubleSupplier.getAsDouble()>0.2 && doubleSupplier.getAsDouble()<-0.2){
|
||||
brasTelescopique.AvanceRecule(doubleSupplier.getAsDouble());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -33,6 +33,6 @@ public class FermePince extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,6 @@ public class OuvrePince extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class PivotBrasRentre extends CommandBase {
|
||||
pivot.monteDescendre(0);
|
||||
}
|
||||
else{
|
||||
pivot.monteDescendre(-0.3);
|
||||
pivot.monteDescendre(-0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,6 +57,6 @@ public class PivotBrasRentre extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return brasTelescopique.photocell() && pivot.limitpivot();
|
||||
}
|
||||
}
|
||||
|
@ -38,10 +38,10 @@ public class PivotChercheHaut extends CommandBase {
|
||||
brasTelescopique.AvanceRecule(0.3);
|
||||
}
|
||||
if (pivot.distance()<43.5){
|
||||
pivot.monteDescendre(0.4);
|
||||
pivot.monteDescendre(0.5);
|
||||
}
|
||||
else if(pivot.distance()>44.5) {
|
||||
pivot.monteDescendre(-0.4);
|
||||
pivot.monteDescendre(-0.5);
|
||||
}
|
||||
else{
|
||||
pivot.monteDescendre(0);
|
||||
|
@ -27,7 +27,8 @@ public class PivotManuel extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
pivot.monteDescendre(doubleSupplier.getAsDouble());
|
||||
if(doubleSupplier.getAsDouble()>0.2 && doubleSupplier.getAsDouble()<-0.2){
|
||||
pivot.monteDescendre(doubleSupplier.getAsDouble());}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -43,10 +43,10 @@ public class PivoteBrasBas extends CommandBase {
|
||||
brasTelescopique.ouvrir();
|
||||
}
|
||||
if (pivot.distance()<8.5){
|
||||
pivot.monteDescendre(0.3);
|
||||
pivot.monteDescendre(0.4);
|
||||
}
|
||||
else if(pivot.distance()>10.5) {
|
||||
pivot.monteDescendre(-0.3);
|
||||
pivot.monteDescendre(-0.4);
|
||||
}
|
||||
else{
|
||||
pivot.monteDescendre(0);
|
||||
@ -65,6 +65,7 @@ public class PivoteBrasBas extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return brasTelescopique.distance()>-13.5 && brasTelescopique.distance() <-15.5 && pivot.distance()<8.5 && pivot.distance()>10.5;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class PivoteBrasHaut extends CommandBase {
|
||||
brasTelescopique.AvanceRecule(-0.15);
|
||||
brasTelescopique.fermer();
|
||||
}
|
||||
else if(brasTelescopique.distance()<41.5) {
|
||||
else if(brasTelescopique.distance()<-41.5) {
|
||||
brasTelescopique.AvanceRecule(-0.15);
|
||||
}
|
||||
else {
|
||||
@ -41,10 +41,10 @@ public class PivoteBrasHaut extends CommandBase {
|
||||
brasTelescopique.ouvrir();
|
||||
}
|
||||
if (pivot.distance()<50.5){
|
||||
pivot.monteDescendre(0.4);
|
||||
pivot.monteDescendre(0.5);
|
||||
}
|
||||
else if(pivot.distance()>52.5) {
|
||||
pivot.monteDescendre(-0.4);
|
||||
pivot.monteDescendre(-0.5);
|
||||
}
|
||||
else{
|
||||
pivot.monteDescendre(0);
|
||||
@ -62,6 +62,6 @@ public class PivoteBrasHaut extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return brasTelescopique.distance()>-39.5 && brasTelescopique.distance() <-41.5 && pivot.distance()<50.5 && pivot.distance()>52.5;
|
||||
}
|
||||
}
|
||||
|
@ -30,21 +30,21 @@ public class PivoteBrasMilieux extends CommandBase {
|
||||
@Override
|
||||
public void execute() {
|
||||
if(brasTelescopique.distance()>-16.5){
|
||||
brasTelescopique.AvanceRecule(-0.2);
|
||||
brasTelescopique.AvanceRecule(-0.15);
|
||||
brasTelescopique.fermer();
|
||||
}
|
||||
else if(brasTelescopique.distance()<-17.5) {
|
||||
brasTelescopique.AvanceRecule(0.2);
|
||||
brasTelescopique.AvanceRecule(0.15);
|
||||
}
|
||||
else {
|
||||
brasTelescopique.AvanceRecule(0);
|
||||
brasTelescopique.ouvrir();
|
||||
}
|
||||
if (pivot.distance()<43.5){
|
||||
pivot.monteDescendre(0.4);
|
||||
pivot.monteDescendre(0.6);
|
||||
}
|
||||
else if(pivot.distance()>44.5) {
|
||||
pivot.monteDescendre(-0.4);
|
||||
pivot.monteDescendre(-0.6);
|
||||
}
|
||||
else{
|
||||
pivot.monteDescendre(0);
|
||||
@ -63,6 +63,7 @@ public class PivoteBrasMilieux extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
return brasTelescopique.distance()>-16.5 && brasTelescopique.distance() <-15.5 && pivot.distance()<44.5 && pivot.distance()>43.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user