Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
double v1 = (radius * Math.cos(ang) + turnCon) * getMultiplier();
double v2 = (radius * Math.sin(ang) - turnCon) * getMultiplier();
double v3 = (radius * Math.sin(ang) + turnCon) * getMultiplier();
double v4 = (radius * Math.cos(ang) - turnCon) * getMultiplier();
robot.motorLeftFront.setPower(v1);
robot.motorRightFront.setPower(v2);
robot.motorLeftRear.setPower(v3);
robot.motorRightRear.setPower(v4);
if (addTelemetry && telemetry != null) {
telemetry.addLine(Util.createLevel((float) v1));
telemetry.addLine(Util.createLevel((float) v2));
telemetry.addLine(Util.createLevel((float) v3));
telemetry.addLine(Util.createLevel((float) v4));
}