pub unsafe extern "C" fn imu_get_rotation(port: u8) -> f64
Expand description
Get the total number of degrees the Inertial Sensor has spun about the z-axis
This value is theoretically unbounded. Clockwise rotations are represented with positive degree values, while counterclockwise rotations are represented with negative ones.
This function uses the following values of errno when an error state is reached: ENXIO - The given value is not within the range of V5 ports (1-21). ENODEV - The port cannot be configured as an Inertial Sensor EAGAIN - The sensor is still calibrating
\param port The V5 Inertial Sensor port number from 1-21 \return The degree value or PROS_ERR_F if the operation failed, setting errno.
\b Example \code #define IMU_PORT 1
void opcontrol() { while (true) { printf(“IMU get rotation: %f degrees\n”, imu_get_rotation(IMU_PORT)); delay(20); } } \endcode