DJI MSDK Can't take off
CompletedPlease, We need some solutions.
I have see another poster hving the same issue.
I have this code:
FlightControllerKey.KeyStartTakeoff.create().action({
Log.d("takeoff","TakeOff Success")
}, { e: IDJIError ->
Log.d( "takeoff","DJI Takeoff error: " + e.description())
})
This does not work, and the error message is null.
I also tried with this:
KeyManager.getInstance().performAction(KeyTools.createKey(FlightControllerKey.KeyStartTakeoff),
object: CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
override fun onSuccess(
nil: EmptyMsg
) {
Log.i(
"Monsoon Action",
"Taking off"
)
}
override fun onFailure(
error: IDJIError
) {
Log.i(
"Monsoon Action",
"Takeoff failed $error"
)
}
}
)
I get: Takeoff failed ErrorImp{errorType='CORE', errorCode='SYSTEM_ERROR', innerCode='', description='null', hint='error code = -7'
I also tried:
FlightControllerKey.KeyStartTakeoff.create().action({
Log.d("Monsoon Command Execution : ", "takeoff success!")
}, { e: IDJIError ->
val d = e.description()
Log.d("Monsoon Command Execution : ", "takeoff error! $d")
})
I get takeoff error ! null
I am using MSDK V 5.7
#Why do I get this kind of errors?
-
Our engineers will be on holiday for the Chinese New Year(2-06~ 2-17), which may cause some delays in responding to your ticket. We appreciate your patience and apologize for the inconvenience this may cause you. You can first search for related articles in our knowledge base https://djisdksupport.zendesk.com/hc/en-us We will answer your ticket as quickly as possible when the holiday is over. -
Have you tried our sample code? We have tested the sample code and have not been able to reproduce this issue. The link of sample code: https://github.com/dji-sdk/Mobile-SDK-Android-V5 -
This is my final solution:
private fun takeOff(id: String) { Log.d("Monsoon Command Execution :", "Takeoff") val callback = object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> { override fun onSuccess(t: EmptyMsg?) { Log.d("Monsoon Command Execution :","start takeOff onSuccess.") } override fun onFailure(error: IDJIError) { Log.e("Monsoon Command Execution :", "start takeOff onFailure,$error") var e = error.description() if (e == "null") e = "unknown" } } FlightControllerKey.KeyStartTakeoff.create().action({ callback.onSuccess(it) }, { e: IDJIError -> callback.onFailure(e) }) }
Please sign in to leave a comment.
Comments
11 comments