FlightController.getSimulator().setStateCallback

Completed

Comments

3 comments

  • DJI Developer Support
    有通过Simulator.start开启模拟器吗?因为FlightController.getSimulator().setStateCallback设置的是模拟器状态的回调,如果没有开启模拟器,那么就获取到数据。
    0
    Comment actions Permalink
    mFlightController.getSimulator()
    .start(InitializationData.createInstance(new LocationCoordinate2D(39, 114), 10, 10),
    new CommonCallbacks.CompletionCallback() {
    @Override
    public void onResult(DJIError djiError) {
    if (djiError != null) {
    ToastUtils.showShort(djiError.getDescription());
    } else {
    ToastUtils.showShort("Start Simulator Success");
    }
    }
    });
    开启模拟器是显示Param Illegal(255)


    0
    Comment actions Permalink
  • DJI Developer Support
    你使用sample的InitializationData也是会报出参数错误吗?你是什么机型呢?使用的是哪个版本的MSDK? sample:Mobile-SDK-Android/VirtualStickView.java at master · dji-sdk/Mobile-SDK-Android (github.com)
    0
    Comment actions Permalink

Please sign in to leave a comment.