Open seungbeom-son opened 3 years ago
Agent comment from Luce Luo in Zendesk ticket #44987:
Dear Customer,
Thank you for contacting DJI. First, please ensure you have upgraded to the latest drone, H20 firmware, and use the latest 4.14 SDK. Second, to set/get the hybrid zoom need to switch to the ZOOM lens first via the method setCameraVideoStreamSource:withCompletion and ensure the current lens is a zoom type. Third, the method setHybridZoomFocalLength:withCompletion parameter should be the "minHybridFocalLength + N*focalLenthStep", change the N. And the MSDK doesn't have the magnification, only the valid range can be changed, you can implentment your own magnification.
If the problem persists, please contact us via the form with more detail. https://formcrafts.com/a/dji-developer-feedback-en
Thanks,
Luce Luo DJI Developer Support
I want to set hybrid zoom focal length programatically.
I read this document https://developer.dji.com/api-reference/ios-api/Components/Camera/DJICamera_DJILens.html#djicamera_djilens_sethybridzoomfocallength_inline, but I cannot understand the correlation between zoom focal length (NSUInteger type) and real magnification (ex 2.0X, 5.0X, etc)
In addition, I could not set hybrid zoom focal length with the value that I got from getHybridZoomFocalLength API, like this.
lense.getHybridZoomFocalLength { (zoomFocalLength, error) in if let error = error { LOG_DEFAULT(message: "failed to get hybrid zoom focal length: \(error.localizedDescription)") } else { LOG_DEFAULT(message: "zoom focal length: \(zoomFocalLength)") lense.setHybridZoomFocalLength(zoomFocalLength) { (error2) in if let error2 = error2 { LOG_DEFAULT(message: "failed to set hybrid zoom focal legnth: \(error2.localizedDescription)") } } } }
When I ran this code, I get the error 'The parameters are invalid. Please review and submit the request.(code:-1005)'
In summary, I want to know