Can't find the Camera.Key to report WaypointCameraZoomParam.setFocalLength

Completed

Comments

10 comments

  • DJI Developer Support
    setFocalLength should affect lens(0).getHybridZoomFocalLength's value. DJI Key is HYBRID_ZOOM_FOCAL_LENGTH.
    0
    Comment actions Permalink
  • Kenneth Argo

    Sorry, but I already tried these three: HYBRID_ZOOM_FOCAL_LENGTH, OPTICAL_ZOOM_FOCAL_LENGTH and 
    CAMERA_TARGET_FOCAL_LENGTH.

     

    None of the keys are called when the V2 mission action sets the value.

    0
    Comment actions Permalink
  • DJI Developer Support
    Are you using H20/H20T? We will test.
    0
    Comment actions Permalink
  • Kenneth Argo

    M300 RTK with H20

    0
    Comment actions Permalink
  • DJI Developer Support
    Firmware Version of Drone:03..0.0014 Firmware Version of RC: Firmware Version of H20T: MSDK version:4.16.1 The result of the test is that the focal length can be obtained normally with HYBRID_ZOOM_FOCAL_LENGTH. The test log file and test code are attached.Perhaps there is no value due to a faulty acquisition. You can refer to the code used for our tests.
    0
    Comment actions Permalink
  • Kenneth Argo

    You confirmed this during a V2 mission flight?  All my keys are initialized the same, and all other keys are reporting correctly so I am 100% certain the key connection is correct...

    This is the listener, the log statement is never seen


    private val zoomLevelKeyListener = KeyListener { _, o1 ->

    logInfo("AircraftDataSourceImpl::zoomLevelKeyListener: $o1")

    if (o1 is Int) {
    zoomLevelMutableLiveData.postValue(o1)
    }
    }
    0
    Comment actions Permalink
  • DJI Developer Support
    Yes, my previous tests were carried out on the M300. I also tested the keylistener on the M300 during the route V2 run and the result was also that the focal length was acquired properly. Can you get the value of other keys by the same form? If you have set up the listeners correctly, then it is possible that there is a problem with the fetching or output part. The application I used for my tests was MSDK SAMPLE. Here are the logs and the code used during my tests.
    0
    Comment actions Permalink
  • Kenneth Argo

    Yes, all other key listeners are working, I registered over a dozen keys, all work with the exception of this one.

    0
    Comment actions Permalink
  • Kenneth Argo

    I think I found te issue (had your test code been included I think it would have found it quicker).  I should be using createLenseKey (I was using create()).  This can be closed

    0
    Comment actions Permalink
  • DJI Developer Support
    I'm glad I could help you. This is really a point that is easily overlooked. If the lens class of the drone is the lens class, then the createLenseKey interface is needed to create the key.
    0
    Comment actions Permalink

Please sign in to leave a comment.