We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 678c578 + 452e1b8 commit 0ff0112Copy full SHA for 0ff0112
examples/utils/calibration/alignment_and_cogging_test/alignment_and_cogging_test.ino
@@ -35,9 +35,10 @@ void testAlignmentAndCogging(int direction) {
35
36
for (int i = 0; i < sample_count; i++) {
37
38
- float electricAngle = (float) direction * i * motor.pole_pairs * shaft_rotation / sample_count;
+ float shaftAngle = (float) direction * i * shaft_rotation / sample_count;
39
+ float electricAngle = (float) shaftAngle * motor.pole_pairs;
40
// move and wait
- motor.move(electricAngle * PI / 180);
41
+ motor.move(shaftAngle * PI / 180);
42
_delay(5);
43
44
// measure
0 commit comments