pub unsafe extern "C" fn vision_get_by_code(
    port: u8,
    size_id: u32,
    code: vision_color_code_t
) -> vision_object_s_t
Expand description

Gets the nth largest object of the given color code according to size_id.

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 a vision sensor EAGAIN - Reading the vision sensor failed for an unknown reason.

\param port The V5 port number from 1-21 \param size_id The object to read from a list roughly ordered by object size (0 is the largest item, 1 is the second largest, etc.) \param color_code The vision_color_code_t for which an object will be returned

\return The vision_object_s_t object corresponding to the given color code and size_id, or PROS_ERR if an error occurred.