Closed cyoian closed 5 years ago
Hi, there are two options for you to ask for help:
Post your issues on StackOverflow: https://stackoverflow.com/questions/tagged/dji-sdk, the community can help you.
Report your issues to dev@dji.com, as it's our official channel for developers to request DJI Developer Support now.
For DJI Developer Support, we have the following three tiers:
Standard
This free support is available to anyone reaching out to dev@dji.com. There is no guarantee for response time.
Preferred
This support comes with Pro membership for 99 USD per year. You can purchase it on DJI Developer Website. These requests have priority over Standard ones. Starting today, Preferred questions will be replied to within 2 to 5 business days (Monday – Friday).
Premium
This one-time ticket is considered high-priority and costs 499 USD per issue. You can purchase it on DJI Developer Website after you become the Pro membership developer. Starting today, Premium questions will be replied to within 1 business day (Monday – Friday). This may include communication with DJI SDK engineers, but will not involve face-to-face interaction. Time limitations apply, and please keep in mind that one question is permitted per ticket. We will do our best to resolve your issue, but there some situations demand deeper engineering efforts.
I have the same problem. The camera name is Mavic 2 Enterprise Dual-Visual. But changing the display mode with setDisplayMode() returns "Not supported".
Hi Paul,
I figured out the problem on this. You have to always call setDisplayMode() on the thermal camera and not the visual camera. Here is how I implemented it:
func checkForMavic2Enterprise() {
guard let product = DJISDKManager.product() else {
print("No product")
return
}
if product.model == "Mavic 2 Enterprise Dual" {
guard let camera = fetchCamera() else {
print("Camera is nil")
return
}
camera.setDisplayMode(DJICameraDisplayMode.visualOnly, withCompletion: nil)
}
}
// get the drone camera
func fetchCamera() -> DJICamera? {
if let product = DJISDKManager.product() {
if let productKind = product as? DJIAircraft {
guard let cameras = productKind.cameras else {
print("Cameras are nil")
return productKind.camera
}
// if there is more than one camera, the second is an infrared camera that can perform functions related to switching camera view modes
if cameras.count > 1 {
return cameras[1]
} else {
return productKind.camera
}
} else if let productKind = product as? DJIHandheld {
print("HANDHELD CAMERA: \(productKind.camera.debugDescription)")
return productKind.camera
}
}
return nil
}
Perfect! Thanks for the tip!
Regards, Paul
Hello, I am trying to set the camera mode when the Mavic 2 Enterprise is attached but I am getting an error:
camera!.setDisplayMode(DJICameraDisplayMode.MSX, withCompletion: nil)
SWITCHING TO MSX Error: Optional(Current product does not support this feature.(code:-1013)) SWITCHING TO THERMAL Error: Optional(Current product does not support this feature.(code:-1013)) SWITCHING TO VISUAL Error: Optional(Current product does not support this feature.(code:-1013))