Open fatbringer opened 2 years ago
Agent comment from yating.liao in Zendesk ticket #67092:
We can only read the latest status of the gimbal or drone in the respective callbacks, and then update the screen information in a method
Although the callback method is both onUpdate, this method belongs to a different class, so there is no way to merge these two methods into one in the code.
°°°
@dji-dev can i use the callbacks to update a variable, then access the variable elsewhere from within the same class ?
Eg i assign dronePitch = djiFlightControllerCurrentState.getAttitude().pitch; , where dronePitch is a private float
Thereafter, in another function, i format dronePitch into another string, then display the new string in stringBuffer ?
Agent comment from yating.liao in Zendesk ticket #67092:
Yes, you can do that. This is how we go about implementing screen information updates at sample as well.It's like this.
image.png
°°°
@dji-dev how can i find the camera's current FOV and zoom level ? I don't need to set the value, but i want to read the current value of the FOV and number of times zoomed
Agent comment from yating.liao in Zendesk ticket #67092:
What kind of drone are you using? If it is a drone that supports zoom, you can get the current focal length by getHybridZoomFocalLength or getDigitalZoomFactor.If it is a drone that does not support zoom, you can find out the fixed focal length of the camera in the parameters of the corresponding model.
You should also be able to find out the FOV values on the UAV parameters page.
°°°
@dji-dev i am using Mavic 2 enterprise advanced. I am also looking to use for M210 and M300
Agent comment from yating.liao in Zendesk ticket #67092:
The M2EA's visible camera supports zoom, you can get the current focal length with lens.getHybridZoomFocalLength. the M210 and M300 can carry different cameras, so you need to judge according to the camera. You can determine if the zoom is supported by isHybridZoomSupported.
°°°
@dji-dev thank you.
may i know where in the API i can find how to move the gimbal ??
I can only find gimbal max and min. What if i want to move it to an intermediate angle ? Like 35 degrees ?
Agent comment from yating.liao in Zendesk ticket #67092:
You can use gimbal.rotate to pass in the specified angle.
°°°
Please look at the Gimbal class, it contains everything you need; hint, you don’t move the gimbal, you rotate it.
It is best if you learn how to use the available documentation, posting questions for common operations documented and included in the example will not lead to an efficient development on your part.
From: ykn96 @.> Sent: Wednesday, July 13, 2022 5:35 AM To: dji-sdk/Mobile-SDK-Android @.> Cc: Subscribed @.***> Subject: Re: [dji-sdk/Mobile-SDK-Android] Combine drone telemetry and gimbal telemetry (Issue #1153)
@dji-dev https://github.com/dji-dev thank you.
may i know where in the API i can find how to move the gimbal ??
I can only find gimbal max and min. What if i want to move it to an intermediate angle ? Like 35 degrees ?
— Reply to this email directly, view it on GitHub https://github.com/dji-sdk/Mobile-SDK-Android/issues/1153#issuecomment-1183167807 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHP4OCZUAMYGQXKAGIJU53VT2ZY7ANCNFSM52SBIWOA . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/ADHP4OHZWKFFA44F7E5FDJDVT2ZY7A5CNFSM52SBIWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOI2C3KPY.gif Message ID: @. @.> >
Hi ! I am looking to combine the onUpdate functions for both the drone telemetry and gimbal telemetry, such that whenever they are updated, the values can be shown on the screen
How may i combine these 2 functions ? Since both uses the onUpdate function ? Drone telemetry. Currently i have found from the sdk and written code like this below.
Gimbal telemetry. I see this inside PushGimbalDataView.java in the example app.
Can i combine them under the same OnUpdate ? Or do it have to be different OnUpdate ?
=============== Question: How do i find the camera's FOV and current zoom level ??