Unable to Click Elements on UX SDK
CompletedHello all:
I have downloaded the UXSDK beta version and built it on my phone, but when I try to run it on my air2s I have found the on-screen controls unresponsive. I am unable to take photos/videos, nor am I able to switch between photo and video mode-likely something wrong with the camera control widget. How do I fix this?
Additionally, I hope to take a photo, automatically download the image to my phone (with metadata), and upload it to a server via api for further processing. Is this possible to do?
-
Could you provide us with a video recording to help us better understand the issue you are facing?You can upload the video using the following address:https://pan-sec.djicorp.com/s/AcowM27jyBSTM4G password:dji123 -
DJI Developer Support Please check the folder for the video recording.
-
I have reviewed the video you provided. It seems that the issue is caused by an error in the CameraIndex.
-1 indicates CAMERA_INDEX_UNKNOWN, so there is no response to the click time of the key.
Here is the solution -- add “
displaySide = CameraSide.PORT
”
Actually, there are some missing assignments of
displaySide
in the above conditions. I suggest adding them as well. -
That partially worked, thanks! I can switch modes and take photos now. However, the "record video" button still remains inoperable. I've checked videosignalwidgetmodel.kt and FPVWidgetModel.kt, but found nowhere else to add the displayside line in these 2 areas.
(Edit: After more testing, the video mode failed on the Air 2S but worked on the Mavic 2 Pro-is this due to hardware changes? What do I need to change to make it work with the Air 2S?)
As for "missing assignments ofdisplaySide
in the above conditions", I cannot seem to find them? All the other aircraft models seem to have displayside definitions already, so could you please elaborate on this point?
Thanks again for your time and effort!
Shang -
As for "missing assignments of
displaySide
in the above conditions", I cannot seem to find them? All the other aircraft models seem to have displayside definitions already, so could you please elaborate on this point?--> You can add the line "displaySide = CameraSide.PORT" to the updateCameraDisplay function in the FPVWidgetModel. In this function, you can find that only the port setting for multi-camera aircraft is implemented.
The video mode failed on the Air 2S but worked on the Mavic 2 Pro-is this due to hardware changes? What do I need to change to make it work with the Air 2S?)
-->You may need to debug and test it. The camera mode switching interface used by AIR 2S and Mavic 2 Pro is different, probably because of this. Here are the supported interfaces for AIR 2S:https://developer.dji.com/api-reference/android-api/Components/Camera/DJICamera.html#djicamera_setflatmode_inline
Please sign in to leave a comment.
Comments
5 comments