dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
577 stars 256 forks source link

M300 RTK not receiving video(swift) #413

Open ynaka01-max opened 3 years ago

ynaka01-max commented 3 years ago

I tried swift sample code(https://github.com/dji-sdk/Mobile-SDK-iOS). However, M300 RTK has not receive video feed, but matrice 210 v2, mavic2zoom and phantom4 received video feed. Why? I read https://github.com/dji-sdk/Mobile-SDK-Android/issues/621 . However, I could not understand how to change or where to change the code. Please teach me specifically where to insert and what to insert?

I inserted code

airLync?.ocuSyncLink?.assignSource(toPrimaryChannel: DJIVideoFeedPhysicalSource.fpvCamera, secondaryChannel: DJIVideoFeedPhysicalSource.fpvCamera, withCompletion: { (error) in
if (error != nil) {
DispatchQueue.main.async {
self.printMessage(text: "airLync Failed: \(error.debugDescription)")
}
}
})

before DJIVideoPreviewer.instance()?.start()

However, nothing happens. Please teach me how to get video feed from M300 RTK.

nab0y4enko commented 3 years ago

We have the same issue.

dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #42095:

Dear Customer,

Thank you for contacting DJI. I have attached a sample code, please replace it with the official sample and test it again. https://github.com/dji-sdk/Mobile-SDK-iOS/tree/master/Sample%20Code/SwiftSampleCode/DJISDKSwiftDemo/Camera/fpv

Thanks,

Luce Luo DJI Developer Support
CameraFPVViewController.swift

Matheus193dn commented 3 years ago

Hi, I just solved this issue. Please compare and replace with my code in viewDidLoad() P/S: Please also add DecodeImageCalibrateLogic.swift in your project if you don't run on DJISample. M300_FPV

ynaka01-max commented 3 years ago

Thank you. I will try.

federiconicoli commented 3 years ago

@dji-dev Hey! I'm having this same issue. I being trying to make FPV feed to work on the M300 with no luck. Also tried with the sample project by adapting it to use OcuSync. The assignSource(toPrimaryChannel:secondaryChannel:withCompletion) always completes with the same error: “There was an error executing the command.(code:-1008)“. Do you know why this could be happening? Is there another way to solve this? I need to solve it as soon as possible. Thank you!

Matheus193dn commented 3 years ago

@federiconicoli hey, did you attached any camera? (such as H20 series or XT series)

federiconicoli commented 3 years ago

Hi @Matheus193dn, I didn't attach a camera. That might be a problem?

Matheus193dn commented 3 years ago

@federiconicoli yup, plz attach a camera. I didn't try this case yet.

federiconicoli commented 3 years ago

It should work without a camera attached, right? I'll try to get a camera asap and I'll let you know. Thank you!

federiconicoli commented 3 years ago

It works with a camera attached!

brien-crean commented 3 years ago

Did anyone figure out how to get the fpv feed from the M300 RTK to work when there is no camera connected?