Guest User

Untitled

a guest
Jul 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. extension MapViewController: DJISDKManagerDelegate {
  2.  
  3. func appRegisteredWithError(_ error: Error?) {
  4. if let error = error {
  5. print(error.localizedDescription)
  6. } else {
  7. DJISDKManager.startConnectionToProduct()
  8. }
  9. }
  10.  
  11. func productConnected(_ product: DJIBaseProduct?) {
  12. if let _ = product {
  13. if DJISDKManager.product()!.isKind(of: DJIAircraft.self) {
  14. let flightController = (DJISDKManager.product()! as! DJIAircraft).flightController!
  15. flightController.delegate = self
  16. }
  17. }
  18. }
  19. }
Add Comment
Please, Sign In to add comment