Function pros_sys::misc::controller_rumble
source · pub unsafe extern "C" fn controller_rumble(
id: controller_id_e_t,
rumble: *const c_char
) -> i32Expand description
Rumble the controller.
\note Controller rumble activation is currently in beta, so continuous, fast updates will not work well.
This function uses the following values of errno when an error state is reached: EINVAL - A value other than E_CONTROLLER_MASTER or E_CONTROLLER_PARTNER is given. EACCES - Another resource is currently trying to access the controller port.
\param id The ID of the controller (e.g. the master or partner controller). Must be one of CONTROLLER_MASTER or CONTROLLER_PARTNER \param rumble_pattern A string consisting of the characters ‘.’, ‘-’, and ’ ’, where dots are short rumbles, dashes are long rumbles, and spaces are pauses. Maximum supported length is 8 characters.
\return 1 if the operation was successful or PROS_ERR if the operation failed, setting errno.