-
Notifications
You must be signed in to change notification settings - Fork 179
CameraKey.KeyStartShootPhoto.create(cameraIndex) on Matrice 4 leads to SYSTEM_ERROR #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Agent comment from YIGUI LIU in Zendesk ticket #138759: When taking a photo, you get the error message "CANNOT_START_TASK_ON_WEAK_GPS", but it doesn't seem to be the real cause. There's an issue with the error return. Based on the experiences of previous developers facing the same situation, it's usually caused by incorrectly calling the photo-taking interface during a waypoint mission, having too short an interval between two photo-taking operations, or the memory card being full. Best Regards, °°° |
Yeah in general the MSDK5 seems to return a lot of such system errors with null descriptions so it's really hard for us to debug what's going on. In this case, we have confirmed that the SYSTEM_ERROR null occurs without having executed any waypoint-related code, no other photo-taking operations before or after the error and while the SD card has multiple GBs of space. We've also made sure to try after restarting the drone and the controller completely. |
Agent comment from YIGUI LIU in Zendesk ticket #138759: You can try to see if you can take photos successfully in the sample code app. In the Key/Value function of the Testing Tools, you can perform operations on relevant keys. If it succeeds, the problem might lie in your code implementation. Refer to the detailed picture below: https://pan-sec.djicorp.com/s/mq8SR2rgXAReLbM After ensuring that the MSDK has been successfully registered and connected to the aircraft, before starting to take photos, you need to set KeyCameraMode to the photo - taking mode, such as PHOTO_NORMAL. We appreciate your email and wish you a wonderful day! °°° |
I tried using your code but when using the physical buttons on the controller of the M4T drone we get the system error still. Only when using the physical buttons though. |
Agent comment from YIGUI LIU in Zendesk ticket #138759: Regarding the issue that the KeyStartShootPhoto interface cannot be executed, you can refer to the following link, which provides relevant introductions about the invocation of MSDK Keys. Regarding the problem that the physical buttons of the M4T cannot perform the photo-taking operation, you can use the MSDK API to Listen the physical buttons (KeyShutterButtonDown), and call KeyStartShootPhoto when it is detected that the button is pressed. For detailed reference, please refer to the [Listen the physical buttons] section in the following article. Best Regards, °°° |
Hello! We are already listening to the physical buttons like this: RemoteControllerKey.KeyShutterButtonDown.create().listen(this) {
if (it != true) return@listen
when (_mediaState.value.cameraModeState) {
CameraModeState.Photo -> shootPhoto()
CameraModeState.Video, CameraModeState.Recording -> switchCameraMode()
}
} where fun shootPhoto() {
val cameraIndex = getCurrentCameraIndex()
if (cameraMode != CameraMode.PHOTO_NORMAL) {
setDjiCameraMode(CameraMode.PHOTO_NORMAL)
}
if (animatePhotoScope == null) animatePhotoScope = CoroutineScope(Dispatchers.Main)
animatePhotoScope?.launch {
_animatePhotoFlow.emit(true)
}
KeyManager.getInstance().performAction(
KeyTools.createKey(CameraKey.KeyStartShootPhoto, cameraIndex),
object : CompletionCallbackWithParam<EmptyMsg> {
override fun onSuccess(p0: EmptyMsg?) {
Timber.i("Started shoot photo with cameraIndex $cameraIndex")
}
override fun onFailure(p0: IDJIError) {
emitMediaError(MediaError.ERROR_PHOTO)
Timber.i("Shoot photo failed for cameraIndex $cameraIndex: ${p0.errorCode()} ${p0.description()}")
}
})
} The issue still persists with the SYSTEM_ERROR only when using the physical buttons and only for the new M4T drone. This same code works fine for the other drones such as M3 enterprise. |
Agent comment from YIGUI LIU in Zendesk ticket #138759: It's a bit strange that the same MSDK code can be used on the M3E but not on the M4T. You can also try passing in ComponentIndexType.LEFT_OR_MAIN and CameraLensType.CAMERA_LENS_ZOOM when calling the KeyStartShootPhoto interface for taking photos, that is, adding the lensType input parameter. Best Regards, °°° |
We are trying to take pictures on a Matrice 4 drone via:
but this initially threw a
CANNOT_START_TASK_ON_WEAK_GPS null
error (why do pictures depend on the GPS signal) and after moving to an outdoor area, we started gettingSYSTEM_ERROR null
. Tried restarting the drone but nothing seems to work right now.The text was updated successfully, but these errors were encountered: