我们采用MSDK4.15在mobile-sdk-android4.15 demo的基础上进行开发。我们测试用M210...

Completed

Comments

10 comments

  • DJI Developer Support
    这个应该不是闪退日志吧,这个确实是报错日志但是应该被catch住了。闪退应该有fatal exception之类的字样,你能把全部的报错给我吗?
    0
    Comment actions Permalink
  • smallUniv

    日志就收集到这些。除非下次再出现,不过就要等了。

    我猜测会不会是我们调用方法的问题。

    rtk.setStateCallback(new RTKState.Callback() {
    @Override
    public void onUpdate(@NonNull RTKState rtkState) {
    // after connected with D-RTK2 station or NTRIP network, location info is already calculated
    isRTKBeingUsed = rtkState.isRTKBeingUsed();
    if (isRTKBeingUsed) {
    if (!isRTKHaveBeUsed){
    isRTKHaveBeUsed = true;
    }
    }
    else{
    if (!isRTKHaveBeUsed){
    Calendar now = Calendar.getInstance();
    if (rtkCloseTime.before(now)){
    rtk.setStateCallback(null);
    ToastUtils.showToast("rtk长时间连接不上,断开重连");
    closeRtk((err)->{
    initRtk();
    });//长时间连接不上,则断开,重新连
    }
    }
    //启动网络RTK服务
    mRTKNetworkServiceProvider = DJISDKManager.getInstance().getRTKNetworkServiceProvider();
    mRTKNetworkServiceProvider.startNetworkService(new CommonCallbacks.CompletionCallback() {
    @Override
    public void onResult(DJIError djiError) {
    if(djiError != null){
    FileLog.d(TAG, "startNetworkService ERROR: " + djiError.getDescription());
    }
    else{
    FileLog.d(TAG, "startNetworkService 启动网络服务成功");
    }
    }
    });
    }
    }
    });
    0
    Comment actions Permalink
  • smallUniv

    我们在rtk状态回调里,判断rtk是否被使用,没有的话,则重复启用网络服务。这样行不行?如果不合适,有没有更好的建议?

    0
    Comment actions Permalink
  • DJI Developer Support
    isRTKBeingUsed为false不代表RTK服务就没有连接,有可能是连接了,但是positionSolution不是Fix或者是接收RTK数据的时间过长,所以即使isRTKBeingUsed为false也不需要重启,重启是没用的。只要你RTKNetworkServiceProvider的NetworkServiceChannelState是TRANSMITTING则说明RTK已启动,就只需要等待就可以了。
    0
    Comment actions Permalink
  • smallUniv

    如果本来isRTKBeingUsed为true,但是飞行过程中rtk,isRTKBeingUsed为false了。如何重连?需要怎么写代码?

    0
    Comment actions Permalink
  • DJI Developer Support
    无法重连,只能等待重启变为true。
    0
    Comment actions Permalink
  • smallUniv

    又闪退了。虽然概率不高,但是会发生。请问如何避免

    java.util.concurrent.RejectedExecutionException: Task dji.internal.rtk.rtcm.fdd.fdd.nhf@916980 rejected from java.util.concurrent.ThreadPoolExecutor@50f1bb9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
    at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:630)
    at dji.internal.rtk.rtcm.fdd.fdd.dgh.fdd(Unknown Source:35)
    at dji.internal.rtk.rtcm.fdd.fdd.ghu.onConnect(Unknown Source:70)
    at dji.internal.rtk.rtcm.fdd.fdd.koy.run(Unknown Source:2)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:224)
    at android.os.HandlerThread.run(HandlerThread.java:67)

    0
    Comment actions Permalink
  • DJI Developer Support
    你的proguard-rules.pro里面有没有包含-keep class com.qx.wz.dj.rtcm.* { *; } 检查一下你的proguard-rules.pro是否和sample的一致。
    0
    Comment actions Permalink
  • smallUniv

    检查过了。有的。因为我们就是在sample上修改的

    0
    Comment actions Permalink
  • DJI Developer Support
    MSDK最好建议使用4.15.1的,因为最后崩溃的地方被加密了,4.15.1的我们才可以解密知道是哪个函数崩溃了,4.15的解密映射文件找不到了。然后确认一下M210RTKV2的固件最新,再复现一次发给我所有信息,我安排研发查一下这个问题。
    0
    Comment actions Permalink

Please sign in to leave a comment.