Skip to content

Commit 649b750

Browse files
committed
fix Motor::getAngle ratio
1 parent a1a15fa commit 649b750

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hardware/Motor/Motor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Angle Motor::getAngle() {
9696
const int ticks = pros::c::motor_get_raw_position(m_port, NULL);
9797
if (ticks == INT_MAX) return from_stRot(INFINITY);
9898
// get the number of times the motor rotated
99-
const Angle raw = from_stRot(ticks / 3600.0);
99+
const Angle raw = from_stRot(ticks / 50.0);
100100
// calculate position after using the gear ratio
101101
const Angle position = raw * (m_outputVelocity / 3600_rpm);
102102
// return position + offset

0 commit comments

Comments
 (0)