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. The full error is: ErrorImp{errorType='CORE', errorCode='SYSTEM_ERROR', innerCode='', description='null', hint='error code = -7'}
I also tried with this:
KeyManager.getInstance().performAction(KeyTools.createKey(FlightControllerKey.KeyStartTakeoff),
object: CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
override fun onSuccess(
nil: EmptyMsg
) {
Log.i(
"Drone Action",
"Taking off"
)
}
override fun onFailure(
error: IDJIError
) {
Log.i(
"Drone Action",
"Takeoff failed $error"
)
}
}
)
I get the same: 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("Drone Command Execution : ", "takeoff error! $d")
})
I get takeoff error ! null
I am using MSDK V 5.7. This happens ever after I arm the drone by pulling back the joysticks and to the center. Drone is connected to the simulator in DJI assistant enterprize
Why do I get this kind of errors? Please, I need a quick solution. Thank you.