Closed graykevinb closed 4 years ago
The class shall be called Turret The methods are:
rotateByJoystick(input): motor.set(input*multiplier)
changeElevationByJoystick(input): motor.set(input*multiplier)
changeElevation() resetRotation() getTurretElevation: return encoder ticks converted to degrees
getTurretRotation: return encoder ticks converted to degrees
setElevation(degrees) //Degrees must be positive or error is thrown move motor until getTurretElevation == degrees
set Rotation(degrees): //Positive degrees turn counter-clockwise and vice versa. Just like cartesian. move motor until getTurretRotation == degrees
resetRotation(): //resets the turret to degree zero. All use of degrees must be in cartesian releative to the starting position. The movement of the motor to a set position should use PID. The multiplier should be set in instantiation of the class. There should be a separate multiplier for setElevation and setRotation.
Overview of Requirements Module controls the movement of the turret while disallowing over-rotating the turret.
Requirements Able to rotate to a specific position. Limits to protect from over-turning Reset to initial position Able to smoothly rotate based on controller-axis input. Give the position of turret in degrees Set turret to specific degrees (Cartesian) relative to start position