connectDrone

fun connectDrone(@NonNull uid: String): Boolean

Connects a drone identified by its uid.

Connects the drone with the best available connector, chosen as follows:

  • If there is only one available connector, then it is used to connect the drone. Otherwise,
  • if there is only one available remote control connector, then it is used to connect the drone.
If none of the aforementioned condition holds, then the connection fails and false is returned. connectDrone method shall be used to select an appropriate connector instead.

Return

true if the connection process has started, otherwise false, for example if the drone is not visible anymore

Parameters

uid

uid of the drone to connect

fun connectDrone(@NonNull uid: String, @NonNull connector: DeviceConnector): Boolean

Connects a drone identified by its uid using a specific connector.

Return

true if the connection process has started, otherwise false, for example if the drone is not visible anymore

Parameters

uid

uid of the drone to connect

connector

the connector through which to establish the connection

fun connectDrone(@NonNull uid: String, @NonNull connector: DeviceConnector, @NonNull password: String): Boolean

Connects a secured drone identified by its uid.

Return

true if the connection process has started, otherwise false, for example if the drone is not visible anymore

Parameters

uid

uid of the drone to connect

connector

the connector through which to establish the connection

password

password to use for authentication