'Waits for specified attributes to be populated from the vehicle (values are initially ``None``).
This is typically called "behind the scenes" to ensure that :py:func:`connect` does not return until
attributes have populated (via the ``wait_ready`` parameter). You can also use it after connecting to
wait on a specific value(s).
There are two ways to call the method:
.. code-block:: python
#Wait on default attributes to populate
vehicle.wait_ready(True)
#Wait on specified attributes (or array of attributes) to populate
vehicle.wait_ready(\'mode\',\'airspeed\')
Using the ``wait_ready(True)`` waits on :py:attr:`parameters`, :py:attr:`gps_0`,
:py:attr:`armed`, :py:attr:`mode`, and :py:attr:`attitude`. In practice this usually
means that all supported attributes will be populated.
By default, the method will timeout after 30 seconds and raise an exception if the
attributes were not populated.
:param types: ``True`` to wait on the default set of attributes, or a
comma-separated list of the specific attributes to wait on.
:param int timeout: Timeout in seconds after which the method will raise an exception
(the default) or return ``False``. The default timeout is 30 seconds.
:param Boolean raise_exception: If ``True`` the method will raise an exception on timeout,
otherwise the method will return ``False``. The default is ``True`` (raise exception).'

def wait_ready(self, *types, **kwargs):

    timeout = kwargs.get('timeout', 30)
    raise_exception = kwargs.get('raise_exception', True)
    if ((list(types) == [True]) or (list(types) == [])):
        types = self._default_ready_attrs
    if (not all((isinstance(item, basestring) for item in types))):
        raise APIException('wait_ready    expects    one    or    more    string    arguments.')
    await = set(types)
    start = monotonic.monotonic()
    while (not await.issubset(self._ready_attrs)):
        time.sleep(0.1)
        if ((monotonic.monotonic() - start) > timeout):
            if raise_exception:
                raise APIException(('wait_ready    experienced    a    timeout    after    %s    seconds.' % timeout))
            else:
                return False
    return True
