0
我试图做一个简单的Takeoff
命令。DroneKit简单起飞不起作用
这里是下面的代码:
ControlApi.getApi(this.drone).takeoff(10, new AbstractCommandListener() {
@Override
public void onSuccess() {
}
@Override
public void onError(int executionError) {
alertUser("Error: " + executionError);
}
@Override
public void onTimeout() {
alertUser("timeout");
}
});
虽然我管理的武装直升机,起飞命令总是返回错误,与executionError
3或4 ,我不知道这意味着什么? 任何一个有executionError
的代码含义? 或者也许知道是什么问题?
您需要武装直升机,并且您还需要处于引导模式。你是否遇到过这两种情况? – squilter
@squilter是的,首先我要武装,然后用'VehicleApi.getApi(this.drone).setVehicleMode(VehicleMode.COPTER_GUIDED);'切换到引导模式,然后是上面的代码。 – Seiran
您是否等待确认模式更改成功? – squilter