pub unsafe extern "C" fn imu_set_euler(
port: u8,
target: euler_s_t,
) -> i32
Expand description
Sets the current reading of the Inertial Sensor’s euler values to target euler values. Will default to +/- 180 if target exceeds +/- 180.
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 raw gyroscope values. If the operation failed, all the structure’s members are filled with PROS_ERR_F and errno is set.
\b Example \code #define IMU_PORT 1
void opcontrol() { while (true) { int32_t val = imu_set_euler(IMU_PORT, {45, 60, 90}); printf(“IMU : {gyro vals: %d}\n”, val); delay(20); } } \endcode