You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The QGC client can be successfully connected with the TCP connection device, but it is not successful for the dronekit-android phone to run on the phone. Is there any difference? Thank you very much!
` @OverRide
protected void initData() {
final Context context = getApplicationContext();
this.controlTower = new ControlTower(context);
this.drone = new Drone(context);
mainHandler = new Handler(getApplicationContext().getMainLooper());
}
@Override
public void onStart() {
super.onStart();
this.controlTower.connect(this);
}
@Override
public void onStop() {
super.onStop();
if (this.drone.isConnected()) {
this.drone.disconnect();
}
this.controlTower.unregisterDrone(this.drone);
this.controlTower.disconnect();
}
@Override
protected void onDestroy() {
super.onDestroy();
}
//********************Tower*********START*****************
@Override
public void onTowerConnected() {//DroneKit-Android Connected
this.controlTower.registerDrone(this.drone, this.handler);
this.drone.registerDroneListener(this);
//开始连接目标设备
startConnect();
}
@Override
public void onTowerDisconnected() {//DroneKit-Android Interrupted
}
`
`
public void startConnect() {
if (this.drone.isConnected()) {
this.drone.disconnect();
}
ConnectionParameter connectionParams = ConnectionParameter.newTcpConnection("192.168.17.254",8081, null, 0L);
this.drone.connect(connectionParams,this);
}
`
The text was updated successfully, but these errors were encountered:
The QGC client can be successfully connected with the TCP connection device, but it is not successful for the dronekit-android phone to run on the phone. Is there any difference? Thank you very much!
`
@OverRide
protected void initData() {
final Context context = getApplicationContext();
this.controlTower = new ControlTower(context);
this.drone = new Drone(context);
mainHandler = new Handler(getApplicationContext().getMainLooper());
`
`
public void startConnect() {
if (this.drone.isConnected()) {
this.drone.disconnect();
}
ConnectionParameter connectionParams = ConnectionParameter.newTcpConnection("192.168.17.254",8081, null, 0L);
`
The text was updated successfully, but these errors were encountered: