Setting Flight Modes in MSDK 5 Android API (Help Needed)
374 3 4-28 02:54
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_Obq4k7pF408Q
lvl.2

Pakistan
Offline

Hi developers,

I'm currently working on an Android application using DJI Mobile SDK 5 (MSDK 5) for controlling DJI drones. In my application, I need to programmatically switch between different flight modes such as Tripod, Sport, and Normal.

In MSDK 4, I found a method setTripodModeEnabled(boolean enabled, @Nullable CompletionCallback callback) which allowed me to switch to Tripod mode. However, in MSDK 5, when referring to the Flight Mode key KeyFlightMode, I noticed that it is only listed as a key that can be listened to and retrieved (canGet(true)), but not set (canSet(false)).

I've checked the documentation thoroughly but couldn't find any method to set the Flight Mode directly. Am I missing something or is there a different approach in MSDK 5 for setting flight modes programmatically?

Here are the relevant links for your reference:
  • MSDK 5 Android API Flight Mode Reference: linkmsdk5
  • MSDK 4 Android API Flight Mode (for setting Tripod mode): linkmsdk4

Any insights or suggestions would be greatly appreciated. Thanks in advance for your help!
4-28 02:54
Use props
Mats Bohlinsson
Second Officer
Flight distance : 1838077 ft
  • >>>
Spain
Offline

You can't.

You couldn't set sport-mode i sdk4 either, except tripod.

In sdk4 I found a way to send down parameter to change the flightmode switch definitions, so you could change the normal posision to sport and so on, without moving the flight mode switch.
But I dont know how to do it in sdk5.
I think that's the only way, but I might be wrong.

Anyway, to do it it will need some hacking.
6-12 11:54
Use props
alyssamorgan
lvl.1

Pakistan
Offline

helpful, thank you
6-12 23:55
Use props
djiuser_Obq4k7pF408Q
lvl.2

Pakistan
Offline

Thank you Mats
6-13 00:59
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules