Get thermal palette range for M30T
已完成Hello, I'm trying to get the supported thermal palette range for the M30T via MSDK5 but the thermalPalette and thermalPaletteRange variables always come back as null. Is there anything that I'm missing? Thanks for your help.
val streamSourceRange = CameraKey.KeyCameraVideoStreamSourceRange.create().get() ?: listOf()
if (streamSourceRange.contains(CameraVideoStreamSourceType.INFRARED_CAMERA)) {
val keyCameraVideoStreamSource = CameraKey.KeyCameraVideoStreamSource.create()
val camVidStreamSrc = keyCameraVideoStreamSource.get()
if (camVidStreamSrc != CameraVideoStreamSourceType.INFRARED_CAMERA) {
keyCameraVideoStreamSource.set(CameraVideoStreamSourceType.INFRARED_CAMERA, onSuccess = {
val thermalPalette = CameraKey.KeyThermalPalette.create().get()
val thermalPaletteRange = CameraKey.KeyThermalPaletteRange.create().get()
Log.d("Thermal", "$thermalPalette $thermalPaletteRange")
}, onFailure = {
Log.e(TAG, "Error setting camera video stream source to INFRARED_CAMERA")
})
} else {
val thermalPalette = CameraKey.KeyThermalPalette.create().get()
val thermalPaletteRange = CameraKey.KeyThermalPaletteRange.create().get()
Log.d("Thermal", "$thermalPalette $thermalPaletteRange")
}
}
-
Also, when attempting to set the thermal palette, I get the error
ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='CAMERA.ThermalPalette:-1', description='null', hint='error code = -1'}CameraKey.KeyCameraVideoStreamSource.create().set(CameraVideoStreamSourceType.INFRARED_CAMERA, onSuccess = {
CameraKey.KeyThermalPalette.create().set(thermalPalette, onSuccess = {
Log.d("Myclass", "Thermal Palette set to: $thermalPalette")
}) {
Log.e("MyClass", "Error setting thermal palette: $it.description()")
}
}) -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. It seems that you haven't set the CameraLensType to CAMERA_LENS_THERMAL, which results in the camera lens not being supported. For the KeyThermalPaletteRange and KeyThermalPalette functions, there are two points to note. 1. To use this function, please call `KeyCameraVideoStreamSource` to set the video source to `INFRARED_CAMERA`. 2. When using `KeyTools` to create a `DJIKey` instance, please set `CameraLensType` to `CAMERA_LENS_THERMAL`. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Thank you for your reply. I wasn't using 'KeyTools' to create a 'DJIKey' instance. But now when I use the KeyTools to create the DJIKey instance, the feature works. So, either there is a bug when using:
CameraKey.KeyThermalPalette.create()
Or, I think the documentation should be updated to say that we MUST use KeyTools to create the DJIKey instance.
Thanks,
Andrew. -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. I'm glad to know that your issue has been resolved. If you have any further questions, feel free to reach out again. Our documentation does need to be updated, and we appreciate your feedback. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team
请先登录再写评论。
评论
4 条评论