Function pros_sys::misc::controller_is_connected
source · pub unsafe extern "C" fn controller_is_connected(
id: controller_id_e_t
) -> i32Expand description
Checks if the controller is connected.
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
\return 1 if the controller is connected, 0 otherwise