rotateToHeading

fun rotateToHeading(targetAngle: Double, power: Double = 0.3, timeout: Double = 3.0)

Rotates to a specific global heading on the field.

Parameters

targetAngle

The global degree you want the robot to face (e.g., 0 to 360 or -180 to 180)

power

The maximum power to apply during rotation

timeout

timeout