Hello, I have an issue where whenever it goes from negative to positive angle value, (im using -180 to 180 degrees setup instead of 0 to 360) the motor just turns like 360 or 180 degrees for some reason; taking the longer path. is there a way to make it take the short path so it doesnt have to spin all around to get to the next angle?
im using position mode, and im using this method to turn the angle into position:
def rad_to_pos(rad, offset=0.0):
rad = wrap_to_pi(rad + offset)
deg = np.rad2deg(rad)
deg = (deg + 360) % 360
return int(deg * 4095 / 360)