GithubHelp home page GithubHelp logo

mobile-sdk-android's People

Contributors

danlongchen avatar dji-dev avatar dji-william avatar hoker1 avatar hooyee-dji avatar mattdbr avatar michael-dji avatar oliverou avatar talobin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-sdk-android's Issues

Too much log coming from DJI SDK

The SDK is often logging a lot of lines in the debug logcat. They all start with: 头校验失败.

It is possible to remove the logcat output in the SDK? A library should probably never spam the log output, ideally.

DJIMissionManager stalls on preparing DJICustomMission

When attempting to upload any custom mission via the mission manager - the process will always stall on DJIMissionManager.prepare(...) and cannot be started.

The completion callback with DJIMissionManager.prepare(...) is never returned.

If using addMissionToTheQueue - the mission will begin to execute, but takeoff unexpectedly and only perform a few of several points before unexpectedly returning home. I don't intend to use this as it circumvents the mission manager, was just curious if it would work

SDK Version: 3.3
Android Devices

  • Nexus 9: API 24
  • Nexus 6P: API 25
    DJI Devices
  • Phantom 3 Professional
    --Remote Controller Firmware: 1.6.0
    --Flight Controller Firmware: 2.04.14.05
    --Gimbal Firmware: 01.44.00.00
    --Camera Firmware: 01.30.50.36
  • Inspire 1 Pro
    --Remote Controller Firmware: 1.7.4.0
    --Flight Controller Firmware: 2.0.4.20.18
    --Gimbal Firmware: 1.29.00.92
    --Camera Firmware: 1.9.1.10

5840 error(s)

Hi, I'm just getting started with the Android Mobile SDK, I cloned it from the repo, and I'm trying to build the sample app. I'm using Android Studio 2.1.2, and gradle plugin 2.1.2.

I get this message when I build:

1:18:30 PM Gradle build finished with 5840 error(s) in 3m 16s 855ms

You can see the full build output here: https://gist.github.com/alexblack/70a2414a4ce6013df886a26a25e7206f
Here is a sample of some errors, how do I fix this?

AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"error","text":"(org.bouncycastle.asn1.ASN1InputStream$1) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"error","text":"and without specifying any "-target" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"error","text":"indicate that it is not an inner class.","sources":[{}]}
AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}

Phantom 3 Standard open nothing happens

Hi,

I made an .apk out of the SDK sample and ran it on my oneplus one android phone with phantom 3 standard connected, and when I hit open, it doesn't do anything. What could cause this?

Thank you!

screenshot_20160616-144627

DJICompletionCallback onResult "Error" for non-errors

Some of the DJIErrors that are returned to DJIBaseComponent.DJICompletionCallback are not errors, they are messages. I expect an error returned to the onResult method to be an error, which indicates to me that the command didn't work.

For example, I paused a DJIHotPointMission and got the following error returned: "The homepoint is paused".

The drone paused the mission, and could resume the mission... no error occurred. This causes a bug in my code, since I believe the drone is still performing the hot point mission, when in fact it has paused correctly.

Cannot set targetSDK to 23 and also build to a 6.0 device due to .so file text moves. ( java.lang.UnsatisfiedLinkError)

If you attempt to do this, you will see:

12-01 15:53:25.657 18600-18600/com.jarone.litterary W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/.../arm/libDJICam.so: has text relocations

See here:

http://stackoverflow.com/questions/32346402/libavcodec-so-has-text-relocations

If you are seeing this, set your targetSDK of your project to 22 until DJI fixes this.

ClassNotFoundException: DataBatteryActiveStatus

I keep getting the exception below, and I don't seem to find DataBatteryActiveStatus in the jar files coming with the SDK. Where is it supposed to be?

java.lang.ClassNotFoundException: dji.midware.data.model.P3.DataBatteryActiveStatus
W/System.err﹕ at java.lang.Class.classForName(Native Method)
W/System.err﹕ at java.lang.Class.forName(Class.java:251)
W/System.err﹕ at java.lang.Class.forName(Class.java:216)
W/System.err﹕ at dji.midware.data.manager.P3.g.a(Unknown Source)
W/System.err﹕ at dji.midware.data.manager.P3.g.d(Unknown Source)
W/System.err﹕ at
dji.midware.usb.P3.UsbAccessoryService$ParseOsdRunnable.run(Unknown Source)
W/System.err﹕ at java.lang.Thread.run(Thread.java:841)
W/System.err﹕ Caused by: java.lang.NoClassDefFoundError:
dji/midware/data/model/P3/DataBatteryActiveStatus
W/System.err﹕ ... 7 more
W/System.err﹕ Caused by: java.lang.ClassNotFoundException: Didn't
find class "dji.midware.data.model.P3.DataBatteryActiveStatus" on path: DexPathList[[zip file
".apk", zip file
"/code_cache/secondary-dexes/.apk.classes2.zip"],nativeLibraryDirectories=[,
/vendor/lib, /system/lib]]
W/System.err﹕ at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
W/System.err﹕ at
java.lang.ClassLoader.loadClass(ClassLoader.java:497)
W/System.err﹕ at
java.lang.ClassLoader.loadClass(ClassLoader.java:457)
W/System.err﹕ ... 7 more

Help

I try sample code in pt3 pro and doesnt dowk, no connected

SDCard Status

Is there a single way to ask for the SD card status? Such as displaying the number of available Megabytes on the card without creating or destroying any content on it?

I know I can listen to the SD card status through the DJICamera component, but the events are only triggered from photos saved or deleted.

Error in SDK 3.1.0: Could not dispatch event

Could not dispatch event: class dji.midware.data.model.P3.DataOsdGetPushCommon to subscribing class class dji.sdk.MissionManager.DJIMissionManager$InnerEventBus
java.lang.NullPointerException
at dji.sdk.MissionManager.DJIMissionManager$InnerEventBus.onEventBackgroundThread(Unknown Source)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at de.greenrobot.event.EventBus.invokeSubscriber(EventBus.java:569)
at de.greenrobot.event.EventBus.postToSubscription(EventBus.java:513)
at de.greenrobot.event.EventBus.postSingleEvent(EventBus.java:475)
at de.greenrobot.event.EventBus.post(EventBus.java:365)
at dji.midware.data.manager.P3.t.setPushRecData(Unknown Source)
at dji.midware.data.model.P3.DataOsdGetPushCommon.setPushRecData(Unknown Source)
at dji.midware.data.manager.P3.t.setPushRecPack(Unknown Source)
at dji.midware.data.manager.P3.l.b(Unknown Source)
at dji.midware.data.manager.P3.l.a(Unknown Source)
at dji.midware.data.manager.P3.l.a(Unknown Source)
at dji.midware.usb.P3.UsbAccessoryService$1.onGetBody(Unknown Source)
at dji.midware.f.a.d.b(Unknown Source)
at dji.midware.f.a.d.a(Unknown Source)
at dji.midware.usb.P3.UsbAccessoryService$RecvBufferRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:841)

Nonfatal EventBus failures

SDK Version: 3.3
Android Devices
-Nexus 9: API 24
DJI Devices
-Phantom 4
--RC Firmware: 1.8.0
--Flight Controller Firmware: 3..1.10.93
--gimbal firmware: 01.50.12.56
--camera firmware: 1.19.52.66

Keep seeing these in our logs, they aren't fatal but assuming any data not being delivered by EventBus isn't the desired behavior.

11-16 10:52:20.022 18354-18862/com.botlink.app E/Event: Could not dispatch event: class dji.midware.data.model.P3.DataOsdGetPushCommon to subscribing class class dji.internal.c.j
                                                        android.content.res.Resources$NotFoundException: String resource ID #0x0
                                                            at android.content.res.Resources.getText(Resources.java:331)
                                                            at android.content.res.Resources.getString(Resources.java:377)
                                                            at dji.midware.g.a.a(Unknown Source)
                                                            at dji.midware.g.a.b(Unknown Source)
                                                            at dji.sdk.util.Util.getString(Unknown Source)
                                                            at dji.internal.c.d.a(Unknown Source)
                                                            at dji.internal.c.g.a(Unknown Source)
                                                            at dji.sdk.base.DJIBaseProduct$1.onDiagnosisUpdate(Unknown Source)
                                                            at dji.internal.c.f.c(Unknown Source)
                                                            at dji.internal.c.j.onEventBackgroundThread(Unknown Source)
                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                            at dji.thirdparty.eventbus.EventBus.invokeSubscriber(EventBus.java:569)
                                                            at dji.thirdparty.eventbus.EventBus.postToSubscription(EventBus.java:513)
                                                            at dji.thirdparty.eventbus.EventBus.postSingleEvent(EventBus.java:475)
                                                            at dji.thirdparty.eventbus.EventBus.post(EventBus.java:365)
                                                            at dji.midware.data.manager.P3.u.post(Unknown Source)
                                                            at dji.midware.data.manager.P3.u.setPushRecData(Unknown Source)
                                                            at dji.midware.data.model.P3.DataOsdGetPushCommon.setPushRecData(Unknown Source)
                                                            at dji.midware.data.manager.P3.u.setPushRecPack(Unknown Source)
                                                            at dji.midware.data.manager.P3.l.b(Unknown Source)
                                                            at dji.midware.data.manager.P3.l.a(Unknown Source)
                                                            at dji.midware.data.manager.P3.l.a(Unknown Source)
                                                            at dji.midware.usb.P3.UsbAccessoryService$1.onGetBody(Unknown Source)
                                                            at dji.midware.f.a.f.c(Unknown Source)
                                                            at dji.midware.f.a.f.a(Unknown Source)
                                                            at dji.midware.usb.P3.UsbAccessoryService$RecvBufferRunnable.run(Unknown Source)
                                                            at java.lang.Thread.run(Thread.java:761)

NullPointerException when SDK is attempting to use DJIFeatureFlags

I am unable to reproduce the issue consistently but will get the SDK to crash the host application when attempting to read feature flags.

Android Devices: Nexus 9, Nexus 6P
Android Studio: v2.2
Android Version: 7.0
DJI SDK Version: 3.3
DJI Product: P3 Controller and Phantom 3 Professional
Flight Controller Firmware: 02.04.15.05
Remote Controller Firmware: 1.6.0

10-13 13:30:50.532 13944-13944/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: , PID: 13944
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Boolean dji.remote.DJIFeatureFlags.isNetworkingEnabled()' on a null object reference
at dji.remote.h.onResponse(Unknown Source)
at dji.thirdparty.retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Transparent Transmission with Android

I am trying to send data from the mobile device to the onboard device and everything works fine on iPhone but on Android it does NOT work. I am using A3 and LB2. Please note that on iPhone it works.

Android: returns "Error on upstream from Mobile Device to OES. Description:Unsupport"
DJIAircraft mAircraft = (DJIAircraft)DJISDKManager.getInstance().getDJIProduct();
DJIFlightController mFlightController = mAircraft.getFlightController();
String message = "Hello, World!";
mFlightController.sendDataToOnboardSDKDevice(message.getBytes(),
new DJIBaseComponent.DJICompletionCallback() {
@OverRide
public void onResult(DJIError pError) {
if (pError == null) {
DJIDialog.showDialog(getContext(),"Success upstream from Mobile Device to OES");
} else {
DJIDialog.showDialog(getContext(), "Error on upstream from Mobile Device to OES. Description:" + pError.getDescription());
}
}
});

Also please note that when calling the isOnboardSDKDeviceAvailable() method it returns false
DJIAircraft mAircraft = (DJIAircraft)DJISDKManager.getInstance().getDJIProduct();
DJIFlightController mFlightController = mAircraft.getFlightController();
String message;
if(mFlightController.isOnboardSDKDeviceAvailable()) {
message = "OnboardSDK device is available!";
}
else{
message = "OnboardSDK device is not available!";
}
DJIDialog.showDialog(getContext(), message);

DJI Mobile SDK Markdown Document Update Guid

Workflow

Official updates will be handled by DJI SDK staff. If an issue/bug is found in our documents, developers are welcome to correct the error and submit a pull request.

Developers must alert the DJI SDK staff of a pull request through a related discussion, such as on forum.dji.com, bbs.dji.com, github issues or email record. If the pull request is valid, the SDK staff will acknowledge the issue being fixed and accept the pull request.

Pull requests that do not follow this guide will not be accepted.

Formatting Markdown Documents

This section covers document formatting and syntax. You can refer to Github's Mastering Markdown Guides for additional reference.

1. Formatting headers with the hashtag symbol #

We structure markdown documents through the use of # symbol to create headers. Multiple # symbols in a row will format smaller headers. Here is a suggested usage example:

Code

# Document Title
## Main Heading 1
### 1. Subheading 1
## Main Heading 2
### 1. Subheading 1
### 2. Subheading 2

Result

Document Title

Main Heading 1

1. Subheading 1

Main Heading 2

1. Subheading 1

2. Subheading 2

It is important that you follow the example shown above, with a single '#' being used for the document title, '##' being used for section headings, and '###' being used for subheadings. This allows us to generate and organize reading interfaces based on these headings.

Please do not adjust the number of '#' symbols used for the aesthetic purpose of adjusting the side of headings, as shown here:

Code

# Document Title
## Main Heading 1
### 1. Subheading 1
## Main Heading 2
### 1. Subheading 1
### 2. Subheading 2

Result

Document Title

Main Heading 1

1. Subheading 1

Main Heading 2

1. Subheading 1

2. Subheading 2

2. Tables

Markdown allows you to create tables, separating the header with the first row with hyphens '-', and separating each column with a pipe symbol '|'.

Here's an example:

Code

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

Result

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

You can also choose to align cell contents:

Code

| Left Aligned |  Center Aligned  | Right Aligned |
|:-------------|:----------------:| -------------:|
| Left | Center | Right |
| Left Aligned | Center Aligned | Right Aligned |

Result

Left Aligned Center Aligned Right Aligned
Left Center Right
Left Aligned Center Aligned Right Aligned

We control text alignment through the colons ':'. The left and right most pipes | are purely aesthetic, and can be omitted. Blank spaces serve no functional purpose besides code readability.

3. Images

All images should be stored in the Images folder. Images should be refered to by their relative path name, rather than an absolute path name.

For example, you should use ![N1UI](Images/N1UI.png) instead of ![N1UI](https://github.com/dji-sdk/Onboard-SDK/blob/master/Onboard_API_Doc/en/Images/N1UI.png)

4. Code

Inline code blocks should be wrapped in backticks:
Code

'var example = true'

Result

var example = true

To insert multiple lines of code, used a Fenced Code Block. Surround code with three tildes '~' to format it:

Code

    ~~~
    void get_control_callback(const void* p_data, unsigned int n_size) { }
    ~~~

Result

void get_control_callback(const void* p_data, unsigned int n_size) { }

Including the name of the language after the opening triple tilde will allow for syntax highlighting:

Code

    ~~~c
    void get_control_callback(const void* p_data, unsigned int n_size) { }
    ~~~

Result

void get_control_callback(const void* p_data, unsigned int n_size) { }

虚拟杆控制权获取

调用 API
enableVirtualStickControlMode
获取虚拟杆的控制权时SDK返回了错误,
错误是:the condition of mission is not satisfied

请问这是怎么回事?调用前需要做什么操作

DJIAoaControllerActivity crashing when attempting to log Intent Action

Android Devices: Nexus 9, Nexus 6P
DJI Product: P3 Controller and Phantom 3 Professional
Android Studio: v2.2
Android Version: 7.0

When plugging in a USB device, DJIAoAControllerActivity causes the application to crash. It appears that the Intent->Action isn't available and somewhere in the logging process it throws a NullPointerException.

It's declaration in the AndroidManifest also has a default launchMode, including a snippet:
`


        <meta-data
            android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
            android:resource="@xml/usb_accessory_filter" />
    </activity>`

The issue weird because it should only launch the Activity when the filter is satisfied, but once it is started it doesn't seem to retain Action - so even if LOG.E didn't throw an NPE it would fail the check and not broadcast the DJISDKManager.USB_ACCESSORY_ATTACHED Intent.

Stack trace
10-06 08:50:33.933 31827-31827/com.botlink.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.botlink.app, PID: 31827 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.botlink.app/dji.sdk.sdkmanager.DJIAoaControllerActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: java.lang.NullPointerException at java.io.File.<init>(File.java:262) at dji.log.DJILogHelper.saveLogInfo2File(Unknown Source) at dji.log.DJILogHelper.LOGE(Unknown Source) at dji.sdk.sdkmanager.DJIAoaControllerActivity.onCreate(Unknown Source) at android.app.Activity.performCreate(Activity.java:6664) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6077)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 

[Question] RCGps frequency

Hi,

after testing DJIRemoteController.RCGpsDataUpdateCallback I noticed that the update frequency varies a lot, sometimes even with 9 satellites it took a few seconds for the callback to be triggered, at its worst it took 20 seconds between two calls.

Question: What is the criterion for the RCGps callback to be triggered, is it when there is significant motion? I also noticed that speed east and speed north was 0 while I was walking around. Do I need to move faster?

Thanks,

DJI SDK sample doesn't work

Android Studio 2.0 (installed April 7th 2016). You guys are missing the ic_launch.png out of drawable. Finally able to compile it and launch it onto a Samsung SM-G920A smart phone. I have connected a Matrice RC controller to it, a Phantom 3 Professional and Phantom 4. In all cases baring none, the app main page status reads: Status: No Product Connected. Model not Available. So I can't open it.
DJI SDK Version 3.1.

DJI Mobile SDK Issues Submit Guide

Workflow

If an issue/bug is found in our source code, developers are welcome to submit an issue on Github. If the issues are valid, the DJI SDK staffs will check and respond to your issues as soon as possible.

Issues that do not follow this guide will not be accepted.

Submit bug issues in the source code

Please provide the following info for us to help fix bugs:

  • Android device type you are using (Like Nexus 5, Samsung Galaxy Tab 4 WIFI, etc)
  • Android Studio or Eclipse version you are using (Like Android Studio 1.3.2, Eclipse 3.6, etc)
  • Android system version you are using (Like Android 6.0, Android 5.1.1, etc)

Submit crash issues in the source code

Please provide the following info for us to help fix crash issues:

  • Crash logs(If you can find it, it would be very helpful)
  • Android device type you are using (Like Nexus 5, Samsung Galaxy Tab 4 WIFI, etc)
  • Android Studio or Eclipse version you are using (Like Android Studio 1.3.2, Eclipse 3.6, etc)
  • Android system version you are using (Like Android 6.0, Android 5.1.1, etc)

A mistake in MOBILE SDK DJI Simulator Tutorial

Is this issue about bugs or crash issues of DJI Android SDK and Sample Code?

In MOBILE SDK DJI Simulator Tutorial - Buidling the Layouts of Activity,
step1 : Creating DJISimulatorApplication Class,
There is a mistake:"Next, Replace the code of the "FPVDemoApplication.java" file with the following.",
I think FPVDemoApplication.java should Change to
"DJISimulatorApplication.java"

无法链接控制器

配置好app的密钥后,打包到手机上运行此app
连接好usb线(可以通过sdk校验),显示Status:No Product Connected.
环境信息:
手机:samsung note5, Android 5.1.1
机器:经纬100
机器固件:V1.5.8
SDK版本:V3.1,刚才拉的最新,没有修改任何代码(除了app密码配置外)。

日志:拉取date失败

org.apache.http.conn.ConnectTimeoutException: Connect to .. timed out at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:126) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:193) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:172) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:130) at org.apache.http.impl.client.DefaultRequestDirector.executeOriginal(DefaultRequestDirector.java:1317) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:707) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:699) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:520) at net.tsz.afinal.f.c.a(Unknown Source) at net.tsz.afinal.f.c.b(Unknown Source) at net.tsz.afinal.c.f.call(Unknown Source) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) 03-22 17:14:05.279 7513: 7513 E/ 拉取date失败,错误原因:Connect to .. timed out

什么情况下造成的?看日志经常会发生。

Tremendous amount of logs from the DJI SDK

I get a million log messages when using the DJI SDK. I get that logging is important, but I'm not debugging the DJI SDK here, I'm debugging my own apps.
Also, a lot of messages do not make it into the log (chatty "expire" messages)

Could you please add a way to turn off log messages from the SDK?

Using version 3.4.1

UsbAccessoryService is obfuscated.

We use UsbAccessoryService.getInstance().isConnected(), which is a public function. In SDK 2.4, it is obfuscated. I think it should not be.

Calling goHome on FlightController throws internal Rx exception.

SDK Version: 3.4
Android Devices

Nexus 9: API 24
Nexus 6P: API 25
DJI Devices
Phantom 3 Professional
--Remote Controller Firmware: 1.6.0
--Flight Controller Firmware: 2.04.14.05
--Gimbal Firmware: 01.44.00.00
--Camera Firmware: 01.30.50.36
Inspire 1 Pro
--Remote Controller Firmware: 1.7.4.0
--Flight Controller Firmware: 2.0.4.20.18
--Gimbal Firmware: 1.29.00.92
--Camera Firmware: 1.9.1.10

When a mission is playing, calling goHome on the flight controller will sometimes cause an exception to be thrown. for rx.exceptions.OnErrorNotImplementedException and says to contact for developer support.

11-08 09:55:45.592 15892-16003/com.botlink.app E/UncaughtException: rx.exceptions.OnErrorNotImplementedException: Server error, please contact [email protected] for help.
at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:386)
at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:383)
at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44)
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:152)
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
at rx.internal.operators.OnSubscribeFromEmitter$BaseAsyncEmitter.onError(OnSubscribeFromEmitter.java:143)
at rx.internal.operators.OnSubscribeFromEmitter$BufferAsyncEmitter.drain(OnSubscribeFromEmitter.java:392)
at rx.internal.operators.OnSubscribeFromEmitter$BufferAsyncEmitter.onError(OnSubscribeFromEmitter.java:343)
at com.botlink.app.data.connection.dji.function.DJIFunction$1.onResult(DJIFunction.java:23)
at dji.internal.a.b.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.botlink.app.data.connection.dji.extras.DJIException: Server error, please contact [email protected] for help.
at com.botlink.app.data.connection.dji.function.DJIFunction$1.onResult(DJIFunction.java:23) 
at dji.internal.a.b.run(Unknown Source) 
at android.os.Handler.handleCallback(Handler.java:751) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:154) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
11-08 09:55:45.804 15892-16003/com.botlink.app D/FirebaseCrashApiImpl: throwable rx.exceptions.OnErrorNotImplementedException: Server error, please contact [email protected] for help.
11-08 09:55:45.898 15892-16003/com.botlink.app E/AndroidRuntime: FATAL EXCEPTION: dji_background_thread
Process: com.botlink.app, PID: 15892
rx.exceptions.OnErrorNotImplementedException: Server error, please contact [email protected] for help.
at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:386)
at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:383)
at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44)
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:152)
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
at rx.internal.operators.OnSubscribeFromEmitter$BaseAsyncEmitter.onError(OnSubscribeFromEmitter.java:143)
at rx.internal.operators.OnSubscribeFromEmitter$BufferAsyncEmitter.drain(OnSubscribeFromEmitter.java:392)
at rx.internal.operators.OnSubscribeFromEmitter$BufferAsyncEmitter.onError(OnSubscribeFromEmitter.java:343)
at com.botlink.app.data.connection.dji.function.DJIFunction$1.onResult(DJIFunction.java:23)
at dji.internal.a.b.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.botlink.app.data.connection.dji.extras.DJIException: Server error, please contact [email protected] for help.
at com.botlink.app.data.connection.dji.function.DJIFunction$1.onResult(DJIFunction.java:23) 
at dji.internal.a.b.run(Unknown Source) 
at android.os.Handler.handleCallback(Handler.java:751) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:154) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
11-08 09:55:46.460 582-633/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=39, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]

SDK3.1 连接状态

在sdk3.0中,如果只连接遥控器(主机没开),如下代码:

DJISDKManager.getInstance().getDJIProduct();
貌似返回的不是null,可以通过这个返回值来判断是否连接了遥控器。

而在SDK3.1中,即使连接了遥控器,这段代码返回为null。

如果判断只有遥控器连接的状态?

crash on using mobile sdk android

Crashing when running latest samples.

Pulled from git, added to android studio (1.4 rc3), added m y DJI dev app key, and gradle built ok; but upon startup, crash:

09-28 12:30:01.575 16624-16624/? I/art: Late-enabling -Xcheck:jni
09-28 12:30:01.787 16624-16624/com.dji.sdkdemo W/ResourcesManager: Asset path '/system/framework/com.android.future.usb.accessory.jar' does not exist or contains no resources.
09-28 12:30:02.203 16624-16640/com.dji.sdkdemo I/art: Background sticky concurrent mark sweep GC freed 2118(114KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 11MB/11MB, paused 11.540ms total 83.029ms
09-28 12:30:02.246 16624-16640/com.dji.sdkdemo W/art: Suspending all threads took: 9.380ms
09-28 12:30:02.251 16624-16640/com.dji.sdkdemo I/art: Background partial concurrent mark sweep GC freed 506(38KB) AllocSpace objects, 1(36KB) LOS objects, 24% free, 11MB/15MB, paused 13.284ms total 41.159ms
09-28 12:30:02.486 16624-16698/com.dji.sdkdemo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-28 12:30:02.498 16624-16624/com.dji.sdkdemo D/Atlas: Validating map...
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/com.dji.sdkdemo-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libGroudStation.so"
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at java.lang.Runtime.loadLibrary(Runtime.java:366)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at java.lang.System.loadLibrary(System.java:988)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at dji.midware.natives.GroudStation.<clinit>(Unknown Source)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at dji.midware.data.params.P3.ParamInfoBean.getParamInfo(Unknown Source)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at dji.midware.data.manager.P3.c.a(Unknown Source)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at dji.midware.data.manager.P3.c.a(Unknown Source)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at dji.midware.data.manager.P3.d.run(Unknown Source)
09-28 12:30:02.502 16624-16696/com.dji.sdkdemo W/System.err:     at java.lang.Thread.run(Thread.java:818)
09-28 12:30:02.503 16624-16696/com.dji.sdkdemo D/GroudStation: Couldn't load lib
09-28 12:30:02.503 16624-16696/com.dji.sdkdemo E/art: No implementation found for long dji.midware.natives.GroudStation.native_hashFromString(byte[]) (tried Java_dji_midware_natives_GroudStation_native_1hashFromString and Java_dji_midware_natives_GroudStation_native_1hashFromString___3B)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime: FATAL EXCEPTION: Thread-277554
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime: Process: com.dji.sdkdemo, PID: 16624
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for long dji.midware.natives.GroudStation.native_hashFromString(byte[]) (tried Java_dji_midware_natives_GroudStation_native_1hashFromString and Java_dji_midware_natives_GroudStation_native_1hashFromString___3B)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime:     at dji.midware.natives.GroudStation.native_hashFromString(Native Method)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime:     at dji.midware.data.params.P3.ParamInfoBean.getParamInfo(Unknown Source)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime:     at dji.midware.data.manager.P3.c.a(Unknown Source)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime:     at dji.midware.data.manager.P3.c.a(Unknown Source)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime:     at dji.midware.data.manager.P3.d.run(Unknown Source)
09-28 12:30:02.610 16624-16696/com.dji.sdkdemo E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818)
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build:  ()
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: OpenGL ES Shader Compiler Version: E031.25.03.04
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: Build Date: 04/06/15 Mon
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: Local Branch: 
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: Remote Branch: 
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: Local Patches: 
09-28 12:30:02.622 16624-16698/com.dji.sdkdemo I/Adreno-EGL: Reconstruct Branch: 
09-28 12:30:02.624 16624-16698/com.dji.sdkdemo I/OpenGLRenderer: Initialized EGL, version 1.4
09-28 12:30:02.643 16624-16698/com.dji.sdkdemo D/OpenGLRenderer: Enabling debug mode 0
09-28 12:30:03.489 16624-16624/com.dji.sdkdemo I/Process: Sending signal. PID: 16624 SIG: 9

Regular fatal exception due to missing resource

Hi, I am seeing a regular fatal exception that crashes my app. It appears to be due to a missing resource within the SDK or at least passing 0 as a resource ID. I can't seem to nail down the exact steps to reproduce, it happens randomly but sometimes 3 or 4 times in a single flight.

I've seen it most often when plugging in the USB cable, but also when downloading images while on the ground, or even during normal flight while simply ready telemetry.

It happens regardless of the drone (Phantom 3, 4, inspire 1 and Mavic pro all seem to see it). I don't think it is drone related.

This is with SDK 3.4 on Android. I've tested on Samsung Tab S2 8" and Samsung Galaxy S7 phones, same result on both (both running Android 6.0.1)

The stack trace is as follows

E/AndroidRuntime: FATAL EXCEPTION: Thread-3703
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:1468)
at android.content.res.Resources.getString(Resources.java:1564)
at dji.midware.g.a.a(Unknown Source)
at dji.midware.g.a.b(Unknown Source)
at dji.sdk.util.Util.getString(Unknown Source)
at dji.internal.c.j.a(Unknown Source)
at dji.internal.c.g.a(Unknown Source)
at dji.sdk.base.DJIBaseProduct$1.onDiagnosisUpdate(Unknown Source)
at dji.internal.c.f.c(Unknown Source)
at dji.internal.c.m.onSuccess(Unknown Source)
at dji.midware.data.manager.P3.u.callbackSuccess(Unknown Source)
at dji.midware.data.manager.P3.u.access$200(Unknown Source)
at dji.midware.data.manager.P3.w.run(Unknown Source)
at java.lang.Thread.run(Thread.java:818)

DJIMissionManager.pauseMissionExecution hangs...

DJI Android SDK version - 3.4
DJI Product: Phantom 4
Android version: 6.0.1
Android device: Samsung Galaxy Tab S2
Android Studio version: 2.2.2

If you call DJIMissionManager.pauseMissionExecution when a mission is not running, rather than calling back the callback with an error, the call goes off into the ether and NEVER calls the callback. This can be an issue because a mission MAY be running when the call to pause is initiated, and then will complete shortly after (within milliseconds). This issue is reproducible at any time simply by calling DJIMissionManager.pauseMissionExecution when a mission has been stopped or before one is started.

The expected behavior would be that the callback will ALWAYS get called (similar to the way the iOS SDK works), and if there is no mission running (or the mission finishes execution after the call to pause is initiated but before it completes) then an appropriate error gets returned. In iOS, that is error code -5016 (No mission is running).

ArrayIndexOutOfBoundsException in dji.midware.usb.P3.UsbAccessoryService

Here is an error I get on a Samsung Galaxy Tab 4 (SM-T330NU) running Android 5.1.1:

java.lang.ArrayIndexOutOfBoundsException: src.length=4096 srcPos=0 dst.length=5120 dstPos=1980 length=3592
       at java.lang.System.arraycopy(System.java)
       at dji.midware.usb.P3.UsbAccessoryService.b()
       at dji.midware.usb.P3.UsbAccessoryService.a()
       at dji.midware.usb.P3.UsbAccessoryService$RecvOsdRunnable.run()
       at java.lang.Thread.run(Thread.java:818)

java.lang.UnsatisfiedLinkError

Nexus6
Android version 5.1.1
with com.android.tools.build:gradle:1.3.0

description : crashed when I just start the demo.

java.lang.UnsatisfiedLinkError: No implementation found for long dji.midware.natives.GroudStation.native_hashFromString(byte[]) (tried Java_dji_midware_natives_GroudStation_native_1hashFromString and Java_dji_midware_natives_GroudStation_native_1hashFromString___3B)
12-01 10:47:26.818 26552-26579/? E/AndroidRuntime: at dji.midware.natives.GroudStation.native_hashFromString(Native Method)
12-01 10:47:26.818 26552-26579/? E/AndroidRuntime: at dji.midware.data.params.P3.ParamInfoBean.getParamInfo(Unknown Source)
12-01 10:47:26.818 26552-26579/? E/AndroidRuntime: at dji.midware.data.manager.P3.c.a(Unknown Source)
12-01 10:47:26.818 26552-26579/? E/AndroidRuntime: at dji.midware.data.manager.P3.c.a(Unknown Source)
12-01 10:47:26.818 26552-26579/? E/AndroidRuntime: at dji.midware.data.manager.P3.d.run(Unknown Source)
12-01 10:47:26.818 26552-26579/? E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818)

Diff. in behaviours of sendFlightControlData between Angle and Parstance yaw control

I'm using sendFlightControlData in my application, and observe the following behaviour:

  1. In Parstance yaw control mode, when I send in zero as roll and pitch for sendFlightControlData call, the drone parks itself in position hold, while

  2. in Angle yaw control mode, when I send in zero as roll and pitch for sendFlightControlData call, the drone fails to position hold

Just wondering if this is expected?

Segmentation fault in libdjivideo.so

When connecting my app, using SDK 3.1, to a P3S the app will crash trying to display the FPV. This usually happens in less than 10 seconds. This doesn't happen for P3A, P3P, or I1.

03-30 10:27:20.201 15830-20615/com.vertical.dji.tracker3 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x9be80000 in tid 20615 (Thread-30438)
03-30 10:27:20.293 5661-5661/? W/debuggerd: type=1400 audit(0.0:15683): avc: denied { search } for name="com.google.android.gms" dev="mmcblk0p28" ino=81492 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
03-30 10:27:20.303 5661-5661/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-30 10:27:20.303 5661-5661/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MMB29V/2554798:user/release-keys'
03-30 10:27:20.303 5661-5661/? A/DEBUG: Revision: '0'
03-30 10:27:20.303 5661-5661/? A/DEBUG: ABI: 'arm'
03-30 10:27:20.303 5661-5661/? A/DEBUG: pid: 15830, tid: 20615, name: Thread-30438 >>> com.vertical.dji.tracker3 <<<
03-30 10:27:20.303 5661-5661/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x9be80000
03-30 10:27:20.341 5661-5661/? A/DEBUG: r0 00000294 r1 00000297 r2 9be7fffd r3 9be7fd69
03-30 10:27:20.341 5661-5661/? A/DEBUG: r4 00000303 r5 aa94238b r6 9be7fffd r7 9f4c0010
03-30 10:27:20.341 5661-5661/? A/DEBUG: r8 9be7f000 r9 00000d69 sl 9f54962c fp 9f549630
03-30 10:27:20.341 5661-5661/? A/DEBUG: ip 00000024 sp 8e997194 lr a00a24b1 pc a015ce06 cpsr 20050030
03-30 10:27:20.343 5661-5661/? A/DEBUG: #00 pc 0020de06 /data/app/com.vertical.dji.tracker3-1/lib/arm/libdjivideo.so (ff_startcode_find_candidate_c+29)

Crash before granting permissions SDK v3.4 on Android 6.0

Hi guys,
There is an issue with the latest version of the SDK on Android 6.0 (tested on Note 4 but probably present on other devices too). I have tested on 3 different applications and getting the same crash. I have tested on the FPV Demo, SDK Sample Code Demo and my own application. Compiling on latest current version of Android Studio.
As far as I understand the SDK uses something before permissions are granted. The issue is only present when permissions are not granted. e.g. on first start after install.
This is the error

E/DJICrashHandler: uncaughtException 4
E/AndroidRuntime: FATAL EXCEPTION: Thread-6770
                  Process: com.dji.sdk.sample, PID: 24895
                  java.lang.SecurityException: getDeviceId: Neither user 10225 nor current process has android.permission.READ_PHONE_STATE.
                      at android.os.Parcel.readException(Parcel.java:1620)
                      at android.os.Parcel.readException(Parcel.java:1573)
                      at com.android.internal.telephony.ITelephony$Stub$Proxy.getDeviceId(ITelephony.java:5371)
                      at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:812)
                      at dji.internal.e.b.i(Unknown Source)
                      at dji.internal.e.b.c(Unknown Source)
                      at dji.internal.e.b.a(Unknown Source)
                      at dji.internal.e.c.run(Unknown Source)

fetchMediaData does not write the file

The function public void fetchMediaData(java.io.File destDir, DJIMediaInfo mDjiMedia, DJIDownloadListener<DJIMediaFile> mCall) does not seem to work on Inspire 1 (latest stable firmware) and P3 Pro + Advanced (latest dev firmware). Tested both in my code and with your DEMO app.

The image looks like it is downloaded (onProgress is called many times and the download takes forever, then onSuccess is called), but it is not written in destDir. Also, onSuccess gives a DJIMediaFile that is apparently useless because it is always null.

Leaked IntentReceiver

Hello,

When exiting, I receive the following error:

Service has leaked IntentReceiver dji.internal.version.c@4309fc40 that was originally registered here. Are you missing a call to unregisterReceiver()?

It says that the IntentReceiver has been registered somewhere in "initParams", called by "DJISDKManager.initSDKManager()".

Could you tell me which IntentReceiver is registered by "initSDKManager()" and how to unregister it?

Thanks in advance!

Yaw rate message or faster yaw from MainController?

Is there anyway to get yaw rate from the SDK? Currently I'm estimating the yaw rate from the yaw status message from the MainController class, but the status only comes in at 10hz, and I'm wondering:

  1. if there exists another API call that obtains yaw speed from the onboard filter and if not,
  2. if there's a way to get faster yaw update.

libdjivideo.so crashes

Hello!

I'm writing an application that performs image processing on the decoded video stream using the DJIReceivedVideoFrameCallBack API, and I'm on v2.4 of the SDK.

We often experience segfault within libdjivideo.so, at ff_combine_frame+286 according to ADB. This is found on Marshmellow and Lollipop across multiple makes of Android devices.

Please kindly advise!

SDK - smal and big problem

getShutterSpeed()

APP will crash if getShutterSpeed is used in ExposureMode "P"rogram or "A"perture Priority

Someone said, this is correct, because shutter speed can not be SET in this modes - so there is also no GET.
This must be wrong. First: Aperture would be the same - You can't SET Aperture in "P"rogram or "S"hutter Priority - but this value you can GET all the time.
Also - even in "P" or "A" - it's important to see, which value the camera will be use for shutter Speed. So I can decide to go to a manual mode or use the program mode.

upper and lower case in constants

Not all the time I use auto complete - but this can bring a lot of Syntax error search - like:

Resolution_2704X1520 - Video resolutions are have a smal "x" - only 2704X1520.
There are also some constants -only- in upper case...

APP and ROS crashes after dowloading the captured image.

I have installed a ROS on Matrice 100's manifold, however, when using either DJI Go App or android-sdk App to retrieve captured image from the drone's camera. The app would immediately be disconnected, and on the other side, the ROS system (dji_sdk_read_cam package) be crashed. Would be appreciated for any suggestions. Thanks!

DJIMissionManager.stopMissionExecution returns the wrong errors...

DJI Android SDK version - 3.4
DJI Product: Phantom 4
Android version: 6.0.1
Android device: Samsung Galaxy Tab S2
Android Studio version: 2.2.2

There are two cases where calling DJIMissionManager.stopMissionExecution returns errors that are unexpected or just plain wrong.

Case 1:

When calling DJIMissionManager.stopMissionExecution when a mission has already been stopped, the error that is sent to the callback is "DJIMissionManagerError.MISSION_RESULT_WAYPOINT_REQUEST_IS_RUNNING" but the actual error to return SHOULD be "DJIMissionManagerError.MISSION_RESULT_WAYPOINT_NOT_RUNNING" because no mission is actually executing, correct? This is 100% reproducible:

  1. Start a waypoint mission
  2. After the mission starts (and before it finished) call DJIMissionManager.stopMissionExecution
  3. Call it a second time, and the 2nd time (and every time thereafter), the error result sent to the callback is DJIMissionManagerError.MISSION_RESULT_WAYPOINT_REQUEST_IS_RUNNING.

Please see below for a suggestion on what the new error should be called.

Case 2

When calling DJIMissionManager.stopMissionExecution when no mission has ever been started, the error that is sent to the callback is "DJIError.COMMON_UNKNOWN" (whose message says "Server error, please contact [email protected] for help."). Calls to this method SHOULD be consistent. If there is no mission running (regardless of whether one has run before or not), the returned value should always indicate that no mission is running. The only current error that seems to indicate that is:

DJIMissionManagerError.MISSION_RESULT_WAYPOINT_NOT_RUNNING

However, since more than one type of mission can be run, it should probably be a more generic error, something along the lines of:

DJIMissionManagerError.MISSION_RESULT_NO_MISSION_RUNNING

This would more closely follow what the iOS SDK is doing, which returns a consistent error from pause/resume/stop if there is not a mission that is currently executing (in the case of iOS it is error code -5016, whose enum name is DJISDKMissionErrorAircraftNoRunningMission).

DJIGroundStationWaypoint - private short heading

Regarding DJIDroneType.DJIDrone_Vision

DJI Phantom 2 Vision requires the following heading input [-3.14159,3.14159]
The DJI Phantom 2 Vision firmware dictates this input and is contradictory to the the following documentation

Mobile SDK Documentation #Heading

Heading of type short can't have decimal values, therefor breaking the heading for the DJI Phantom 2 Vision

Either the DJI Phantom Vision 2 Firmware should be updated, or the old data type of float should be restored.

write failed: ENODEV (No such device)

With SDK 2.4.1, I often get the following "caught exception" in my logcat:

java.io.IOException: write failed: ENODEV (No such device)
  at libcore.io.IoBridge.write(IoBridge.java:455)
 at java.io.FileOutputStream.write(FileOutputStream.java:187)
 at dji.midware.usb.P3.UsbAccessoryService$1.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 at java.lang.Thread.run(Thread.java:841)

Then, the RC is not seen as a USB accessory anymore. I need to kill the App using the SDK, unplug the RC and replug it in order to get it to be recognized as a USB accessory again.

The pitch and roll has something wrong when sendVirtualStickFlightControlData.

I met a strange problem when I developer a Mobile APP using this SDK.
When I used the sendVirtualStickFlightControlData in this APP, I found that the pitch in the Data make the aircraft move right and the roll in the Data make the aircraft move ahead.
I checked the code and try the Sample,then I found the problem appeared again.
In fact,it is not allways wrong.Only the * RollPitchControlMode* is "velocity",the problem will appear.If it is "angle",the program is nromal.
Poor English,so sorry.
Devices:Any Devices
IDE:Android Studio2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.