MSDK5 FPVWiget issue

已完成

评论

25 条评论

  • DJI Developer Support
    Maybe it is a sample bug. Please tell me which camera you are using for M300RTK? Could you record a screen record for me to reproduce the issue, then we will check internally. Please upload the recording to this link, https://pan-sec.djicorp.com/s/San2qRRSbZ7GX2S
    1
    评论操作 固定链接
  • LeoMrn

    I don't know, it may be from me because I think the issue started in the middle of developpment but impossible to understand why. I'm using the FPV of the M300 and I think I don't have the rights to send file in the link.

    0
    评论操作 固定链接
  • DJI Developer Support
    Sorry, I edit the permission again, you can upload now.
    0
    评论操作 固定链接
  • LeoMrn

    No problem, I sent it, I just modified a bit the primaryFlightDisplayWidget that's why it's not the same anymore.

    0
    评论操作 固定链接
  • DJI Developer Support
    I feel like something wrong with your modification. Because it comes up when you first start the app, so it is nothing wrong with the hardware. The difference is the activity life period, first in is onCreate, the second time you go in, the resumer function will be called. Something difference in here.
    0
    评论操作 固定链接
  • LeoMrn

    Yes there is nothing wrong with the hardware because it works well with DJI Pilot 2 but I didn't modify the DefaultActivityLayout (it's the activty from the sample) and it's the activity I call when I press the orange button. 

     

     

    0
    评论操作 固定链接
  • LeoMrn

    The problem is at the red line, that's why I think it comes from the FPV Widget, when I enter in the activity I get a cameraSourceProcessor with a devicePosition = UNKNOWN and a lensType = UNKNOWN.


    0
    评论操作 固定链接
  • LeoMrn

    This could be due to the fact that the FPVWidget class has been a bit modified, in effect I have encountered problems when I followed the tutorial Chapter 3: Integrate the SDK into your project.
    Everything works fine until the last step, I had some kotlin syntax errors at the moment of the run with the DefaultLayoutActivity class.
    One of them was because the FPVWidget class have to override 4 methods like surfaceCreated(holder :SurfaceHolder) but the methods in the widget was surfaceCreated(holder :SurfaceHolder?) so I removed the ? in the fourth methods to solve the error.
    Do you think it could come from here?

    0
    评论操作 固定链接
  • DJI Developer Support
    This is due to IDE issue. It is fine not to override those method. I think this also may related with the kotlin version anyway. Sample also uses the FPV widget, does sample has this issue? For me, the question mark shouldn't make any difference.
    0
    评论操作 固定链接
  • DJI Developer Support
    It only means do nothing if this object is null.
    0
    评论操作 固定链接
  • LeoMrn

    Yes I’m using the sample as shown on the previous video, I call the sample default activity when I press a button.That’s why I don’t understand and I thought I came from the widget.

    0
    评论操作 固定链接
  • LeoMrn

    Ok I got it, I solved the main bug with the FPV widget  but I still have one issue : If I stay on the app and turn the drone off and on again, I lose the FPV and can't get it back even if I kill the app, I have to uninstall and reinstall the app.

     

    0
    评论操作 固定链接
  • DJI Developer Support
    That is impossible, please check the code. Have you install any camera on the aircraft? You can configure the video channel in the Sample.
    0
    评论操作 固定链接
  • LeoMrn

    I sent you a video of the demo test on the same link if you want to check it, I didn't install any camera on the aircraft. To implement the sample, I'm just doing this :

     

    0
    评论操作 固定链接
  • DJI Developer Support
    There is an issue in sample when you hasn't install any camera on it. The FPV may be also black. It is fixed in this branch, https://github.com/dji-sdk/Mobile-SDK-Android-V5/tree/dev-sdk-alpha
    0
    评论操作 固定链接
  • LeoMrn

    I implemented MSDKv5.3.0 a2 and used the uxsdk from the link and I still have the issue. Plus, I noticed an issue (in MSDKv5.2.0 too), there are differences when I run the app for the first time and when I rerun it a second time after kill : there seems to be a problem with the connexion state of the aircraft.

     

    0
    评论操作 固定链接
  • DJI Developer Support
    The connection is build for sure, otherwise you cannot see the video stream. I think there is something wrong with the UX element initialisation.
    0
    评论操作 固定链接
  • LeoMrn

    Yes, will the problem go away if I install a camera on the aircraft ?

    0
    评论操作 固定链接
  • DJI Developer Support
    This is another issue, doest not related with the issue we discuss before.
    0
    评论操作 固定链接
  • LeoMrn

    I don't understand why there are as many issues, I used the last version of sample.. 

     

    0
    评论操作 固定链接
  • LeoMrn

    Plus I noticed than even if aircraft is disconnected, I get a productConnectionProcessor.getValue() in the WidgetModel equals to true, how is this possible?

    DJIKey<Boolean> productConnectionKey = KeyTools.createKey(ProductKey.KeyConnection);
    bindDataProcessor(productConnectionKey, productConnectionProcessor, newValue -> onProductConnectionChanged((boolean) newValue));

    Log.e("TAG__debug__product_base", productConnectionProcessor.getValue().toString());
    0
    评论操作 固定链接
  • DJI Developer Support
    productConnection also includes the RC, so it is possible to be true if the aircraft is switched off.
    0
    评论操作 固定链接
  • LeoMrn

    ok, but it includes the RC even if there is an existant key BatteryKey.KeyConnection? how could I get the AircraftConnectionState then?

     

    0
    评论操作 固定链接
  • LeoMrn

    And do you know if the issue we discuss before will be solved? and when if yes? because this pose a major problem for our drone inspection.

     

    0
    评论操作 固定链接
  • DJI Developer Support
    If you can reproduce it in our MSDK Sample, we will fix it later but we low priority. Since the UXSDK is open source, you can edit as you like.
    1
    评论操作 固定链接

请先登录再写评论。