Open edupazpix4d opened 3 years ago
Agent comment from Luce Luo in Zendesk ticket #45980:
Dear Customer,
Thank you for contacting DJI.
Please use the whiteBalancePresetRange method to check the current valid presets for camera's white balance (see DJICameraWhiteBalancePreset
). Returns nil
if current camera does not support any white balance value or the camera is disconnected.
Thanks,
Luce Luo DJI Developer Support
@dji-dev Can I set white balance to Zenmuse H20? If I access it's capabilities doing camera.lenses.first { $0.lensType == .wide }.capabilities.whiteBalancePresetRange()
it returns an array with 0 as its only element. So, I should be able to set the white balance to automatic, right? However, if I do this
guard let whiteBalance = DJICameraWhiteBalance(preset: auto) else { return }
camera.lenses.first { $0.lensType == .wide }.setWhiteBalance(whiteBalance) { error in
if let error = error {
print("Error setting white balance: \(error.localizedDescription)")
}
}
It fails: Error setting white balance: This command is no longer supported or not supported in this firmware version.(code:-3000)
So if in case it's not supported, whiteBalancePresetRange()
should return an array with one element?
DJI SDK: 4.14 Matrice 300 RTK: V02.02.0301 Zenmuse H20: V02.02.0100
Drone: DJI Matrice 300 RTK. Camera: Zenmuse H20T. Mobile SDK: 4.14.
When calling DJILens setWhiteBalance:
I get:
Error 1300, invalid parameter