Shirley姐!再问两个问题:1. DJI SDK官方文档为什么说openGroundStation 需要F mode? 那样岂不是用不了GPS了?
public void openGroundStation(DJIGroundStationExecuteCallBack mCallBack)Open ground station. Before you get start to use ground station functions please make sure that you have already open ground station.
Precondition:
1. The aircraft has to be in the air.
2. Remote Controller should be in the F mode.
2. 我现在想控制飞机运动 我用了一个按钮来发送水平旋转的指令 可是按下这个按钮后飞机(模拟器里的)确实转了一点点 但是这之后我的安卓程序就卡住了 并且飞机也不转了 有可能是什么原因呢?
Left = (Button) findViewById(R.id.left);
Left.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN){
//handler.sendMessage(handler.obtainMessage(SHOWTOAST, "Down!"));
left_spin = true;
new Thread(){
public void run(){
while (left_spin == true && gndStation == true){
DJIDrone.getDjiGroundStation().sendFlightControlData(20,0,0,0,new DJIExecuteResultCallback(){
@Override
public void onResult(DJIError djiError) {
}
});
handlerTimer.postDelayed(this,25);
}
}
}.start();
}
if(event.getAction() == MotionEvent.ACTION_UP){
//handler.sendMessage(handler.obtainMessage(SHOWTOAST, "Up!"));
left_spin = false;
}
return false;
}
});