Skip to content

Commit

Permalink
Reset to zero on very small radius
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed May 18, 2019
1 parent 9e056c5 commit f87033b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libindi/drivers/auxiliary/joystickdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ joystick_position JoyStickDriver::joystickPosition(int n)
pos.theta += 360;

// Make sure to reset angle if magnitude is zero
if (pos.r == 0)
if (pos.r <= 0.001)
pos.theta = 0;
}
else
Expand Down

0 comments on commit f87033b

Please sign in to comment.