本文整理汇总了Java中com.o3dr.services.android.lib.drone.connection.ConnectionParameter.equals方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionParameter.equals方法的具体用法?Java ConnectionParameter.equals怎么用?Java ConnectionParameter.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.o3dr.services.android.lib.drone.connection.ConnectionParameter
的用法示例。
在下文中一共展示了ConnectionParameter.equals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connectToDrone
import com.o3dr.services.android.lib.drone.connection.ConnectionParameter; //导入方法依赖的package包/类
public void connectToDrone() {
final ConnectionParameter connParams = retrieveConnectionParameters();
if (connParams == null)
return;
boolean isDroneConnected = drone.isConnected();
if (!connParams.equals(drone.getConnectionParameter()) && isDroneConnected) {
Timber.d("Drone disconnection before reconnect attempt with different parameters.");
drone.disconnect();
isDroneConnected = false;
}
if (!isDroneConnected) {
Timber.d("Connecting to drone using parameter %s", connParams);
drone.connect(connParams, this);
}
}
示例2: connect
import com.o3dr.services.android.lib.drone.connection.ConnectionParameter; //导入方法依赖的package包/类
@Override
public void connect(ConnectionParameter connParams) throws RemoteException {
if (connParams == null || !connParams.equals(droneMgr.getConnectionParameter()))
droneMgr.setConnectionParameter(connParams);
try {
// Do a quick scan to see if we need any droneshare uploads
if (connParams != null) {
this.droneMgr.connect();
getService().kickStartDroneShareUploader(connParams.getDroneSharePrefs());
}
} catch (ConnectionException e) {
notifyConnectionFailed(new ConnectionResult(0, e.getMessage()));
disconnect();
}
}
示例3: connectToDrone
import com.o3dr.services.android.lib.drone.connection.ConnectionParameter; //导入方法依赖的package包/类
public void connectToDrone(){
final ConnectionParameter connParams = retrieveConnectionParameters();
if(connParams == null)
return;
boolean isDroneConnected = drone.isConnected();
if(!connParams.equals(drone.getConnectionParameter()) && isDroneConnected) {
drone.disconnect();
isDroneConnected = false;
}
if(!isDroneConnected)
drone.connect(connParams);
}
示例4: connectToDrone
import com.o3dr.services.android.lib.drone.connection.ConnectionParameter; //导入方法依赖的package包/类
public void connectToDrone() {
final ConnectionParameter connParams = retrieveConnectionParameters();
if (connParams == null)
return;
boolean isDroneConnected = drone.isConnected();
if (!connParams.equals(drone.getConnectionParameter()) && isDroneConnected) {
drone.disconnect();
isDroneConnected = false;
}
if (!isDroneConnected)
drone.connect(connParams);
}