1
0
This commit is contained in:
2026-01-14 12:08:38 +01:00
parent 00c26f831d
commit 7b345395c2

View File

@@ -20,9 +20,9 @@ class Robot {
/* Rotate with according speeds */ /* Rotate with according speeds */
const int m = max(max(d1, d2), d3); const int m = max(max(d1, d2), d3);
arm1.update(tArm1, 4 * (m / d1)); arm1.update(tArm1, 2 * (m / d1));
arm2.update(tArm2, 4 * (m / d2)); arm2.update(tArm2, 2 * (m / d2));
yaw.update(tYaw, 4 * (m / d3)); yaw.update(tYaw, 2 * (m / d3));
/* Is destination reached */ /* Is destination reached */
return arm1.angle() == tArm1 return arm1.angle() == tArm1
@@ -49,4 +49,11 @@ class Robot {
/* Rotate to origin */ /* Rotate to origin */
return pose(0, 0, 0); return pose(0, 0, 0);
} }
public: void begin() {
/* Setup motors */
arm1.begin();
arm2.begin();
yaw.begin();
}
}; };