Skip to content

Commit f796c9d

Browse files
committed
added the sqrt(3) factor #372
1 parent c2c4365 commit f796c9d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/utils/calibration/find_kv_rating/encoder/find_kv_rating/find_kv_rating.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Commander command = Commander(Serial);
3636
void doTarget(char* cmd) { command.scalar(&target_voltage, cmd); }
3737
void calcKV(char* cmd) {
3838
// calculate the KV
39-
Serial.println(motor.shaft_velocity/motor.target*30.0f/_PI);
39+
Serial.println(motor.shaft_velocity/motor.target/_SQRT3*30.0f/_PI);
4040

4141
}
4242

examples/utils/calibration/find_kv_rating/hall_sensor/find_kv_rating/find_kv_rating.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Commander command = Commander(Serial);
3333
void doTarget(char* cmd) { command.scalar(&target_voltage, cmd); }
3434
void calcKV(char* cmd) {
3535
// calculate the KV
36-
Serial.println(motor.shaft_velocity/motor.target*30.0f/_PI);
36+
Serial.println(motor.shaft_velocity/motor.target/_SQRT3*30.0f/_PI);
3737

3838
}
3939

examples/utils/calibration/find_kv_rating/magnetic_sensor/find_kv_rating/find_kv_rating.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Commander command = Commander(Serial);
3131
void doTarget(char* cmd) { command.scalar(&target_voltage, cmd); }
3232
void calcKV(char* cmd) {
3333
// calculate the KV
34-
Serial.println(motor.shaft_velocity/motor.target*30.0f/_PI);
34+
Serial.println(motor.shaft_velocity/motor.target/_SQRT3*30.0f/_PI);
3535

3636
}
3737

0 commit comments

Comments
 (0)