The following code snippet shows you how to receive the data on different mobile platforms including iOS and Android.
Please implement the following delegate method of DJIFlightControllerDelegate:
- (void)flightController:(DJIFlightController *_Nonnull)fc didReceiveDataFromOnboardSDKDevice:(NSData *_Nonnull)data; |
For more details, please check DJIFlightController.h file in the iOS SDK.
Please implement the setOnboardSDKDeviceDataCallback
callback function as shown below:
Aircraft mAircraft = (Aircraft)DJISDKManager.getInstance().getProduct(); |
For more details, please check the FlightController class in the Android SDK.
The following SDK interface can help you understand how to communicate with Onboard SDK Device on different mobile platforms including iOS and Android.
Please use the following method of DJIFlightController:
- (void)sendDataToOnboardSDKDevice:(NSData *_Nonnull)data withCompletion:(DJICompletionBlock)completion; |
For more details, please check DJIFlightController.h file in the iOS SDK.
Please implement the sendDataToOnboardSDKDevice
method of DJIFlightController as shown below:
Aircraft mAircraft = (Aircraft)DJISDKManager.getInstance().getProduct(); |
For more details, please check the FlightController class in the Android SDK.