Function imu_get_status

Source
pub unsafe extern "C" fn imu_get_status(port: u8) -> imu_status_e_t
Expand description

Get the Inertial Sensor’s status

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 yaw angle, or PROS_ERR_F if the operation failed, setting errno.

\b Example \code #define IMU_PORT 1

void opcontrol() { while (true) { printf(“IMU yaw: %f\n”, imu_get_yaw(IMU_PORT)); delay(20); } } \endcode