oui
This commit is contained in:
@@ -51,10 +51,10 @@ public class TournerVersMur extends Command {
|
||||
angle = 180;
|
||||
}
|
||||
if(drivetrain.getPigeon2().getYaw().getValueAsDouble()>0 && drivetrain.getPigeon2().getYaw().getValueAsDouble()<180){
|
||||
drivetrain.setControl(drive.withRotationalRate(force));
|
||||
drivetrain.setControl(drive.withRotationalRate(force*180/Math.PI));
|
||||
}
|
||||
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble()>180){
|
||||
drivetrain.setControl(drive.withRotationalRate(-force));
|
||||
drivetrain.setControl(drive.withRotationalRate(-force*180/Math.PI));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,6 @@ public class TournerVersMur extends Command {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return drivetrain.getPigeon2().getYaw().getValueAsDouble()> angle && drivetrain.getPigeon2().getYaw().getValueAsDouble()< angle + 5;
|
||||
return drivetrain.getPigeon2().getYaw().getValueAsDouble()> angle && drivetrain.getPigeon2().getYaw().getValueAsDouble()< angle + 10;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user