Camera change on the Mavic 2 Enterprise Advanced
CompletedHi,
I would like to know how I can change from thermal camera to visual camera in Android. With the functions SettingsDefinitions.ThermalFFCMode and SettingsDefinitions.FlatCameraMode, could you change the view on the screen?
Thanks
-
With the following code could I change to the thermal camera?
Camera camera = FPVDemoApplication.getCameraInstance();
CameraVideoStreamSource cameraVideoStreamSource = CameraVideoStreamSource.INFRARED_THERMAL; camera.setCameraVideoStreamSource(cameraVideoStreamSource, error -> {
if (error == null) {
showToast("Switch Camera Flat Mode Succeeded");
} else {
showToast(error.getDescription());
}
}); -
What I want is to be able to see the live video from the thermal camera or the visual camera on the screen and be able to change it with a button just like the DJI fly app does.
So if by changing the lens I can do that, then I would like to know how to change the lens. If changing the lens does not change the way I see the video, how can I change from one view to another.I made the code that I had previously sent because on the page https://developer.dji.com/api-reference/android-api/Components/Camera/DJICamera.html#djicamera_djicameravideostreamsource_inline, I saw that you could change the way to see the video stream of the Mavic 2 Enterprise Advanced.
-
Hi,
I solved the problem doing the following code:
public void switchDisplayModeToVisualOnly() {
Camera camera = FPVDemoApplication.getCameraInstance();
assert camera != null;
camera.getLens(1).setDisplayMode(SettingsDefinitions.DisplayMode.VISUAL_ONLY, new CommonCallbacks.CompletionCallback() {
@Override
public void onResult(DJIError djiError) {
if (djiError == null) {
showToast("Visual Camera");
// Cambio al modo de visualización "visual only" (solo visual) exitoso
} else {
showToast("Error in camera change");
// Error al cambiar al modo de visualización "visual only" (solo visual)
}
}
});
}Thanks
Please sign in to leave a comment.
Comments
7 comments