Closed huongta157 closed 7 months ago
Agent comment from yating.liao in Zendesk ticket #105256:
Some models can get time and distance. You can refer to this article;https://sdk-forum.dji.net/hc/en-us/articles/7753552666649-How-to-get-the-flight-distance-flight-times-and-total-flight-time
The data obtained from this interface may differ from the data displayed on the official app.
°°°
@dji-dev thank you so much
Agent comment from yating.liao in Zendesk ticket #105256:
I am glad to help you.
°°°
@dji-dev I have a question Have a function to support getting activated days?
val flightDistanceKey: DJIKey =
FlightControllerKey.createFlightAssistantKey(FlightControllerKey.AIRCRAFT_TOTAL_FLIGHT_DISTANCE)
val value = KeyManager.getInstance().getValue(flightDistanceKey)
Sorry @dji-dev I used this code but the value returned to null. Can you help me?
Agent comment from yating.liao in Zendesk ticket #105256:
We currently do not have an interface to retrieve the activation days.
You need to replace "createFlightAssistantKey" with "create" to create FlightControllerKey.AIRCRAFT_TOTAL_FLIGHT_DISTANCE.
°°°
@dji-dev thanks I try to call it on Main and IO thread but the result is still null.
Agent comment from yating.liao in Zendesk ticket #105256:
Could you confirm if the model you are using supports obtaining AIRCRAFT_TOTAL_FLIGHT_DISTANCE? We mentioned in our previous communication that this key only works on the M300 and Mavic 2 Enterprise Advanced.
Thank you.
°°°
@dji-dev I got it, thank you so much.
Agent comment from yating.liao in Zendesk ticket #105256:
I am glad that I could help you.
°°°
Have a function to support getting total fight distance and flight time?