From 7b44437d179ceba0f1ee807d205e838f6c0207b4 Mon Sep 17 00:00:00 2001 From: consti10 Date: Wed, 21 Feb 2024 10:35:43 +0100 Subject: [PATCH] update camera.hpp --- app/telemetry/models/openhd_core/camera.hpp | 31 +++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/app/telemetry/models/openhd_core/camera.hpp b/app/telemetry/models/openhd_core/camera.hpp index fd0603c21..6c07fb19d 100644 --- a/app/telemetry/models/openhd_core/camera.hpp +++ b/app/telemetry/models/openhd_core/camera.hpp @@ -223,45 +223,47 @@ struct XCamera { return {ResolutionFramerate{640, 480, 30}}; } else if (requires_rpi_libcamera_pipeline()) { std::vector ret; - if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX462 || - camera_type==X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX462_LOWLIGHT_MINI){ + if (camera_type == X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX462 || + camera_type == + X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX462_LOWLIGHT_MINI) { ret.push_back(ResolutionFramerate{640, 480, 60}); ret.push_back(ResolutionFramerate{896, 504, 60}); ret.push_back(ResolutionFramerate{1280, 720, 60}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - }else if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX477M || - camera_type==X_CAM_TYPE_RPI_LIBCAMERA_RPIF_HQ_IMX477) { + } else if (camera_type == X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX477M || + camera_type == X_CAM_TYPE_RPI_LIBCAMERA_RPIF_HQ_IMX477) { ret.push_back(ResolutionFramerate{640, 480, 50}); ret.push_back(ResolutionFramerate{896, 504, 50}); ret.push_back(ResolutionFramerate{1280, 720, 50}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - }else if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_RPIF_V2_IMX219){ + } else if (camera_type == X_CAM_TYPE_RPI_LIBCAMERA_RPIF_V2_IMX219) { ret.push_back(ResolutionFramerate{640, 480, 47}); ret.push_back(ResolutionFramerate{896, 504, 47}); ret.push_back(ResolutionFramerate{1280, 720, 47}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - }else if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_SKYVISIONPRO_IMX519){ + } else if (camera_type == + X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_SKYVISIONPRO_IMX519) { ret.push_back(ResolutionFramerate{640, 480, 60}); ret.push_back(ResolutionFramerate{896, 504, 60}); ret.push_back(ResolutionFramerate{1280, 720, 60}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - }else if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_SKYMASTERHDR_IMX708 || - camera_type==X_CAM_TYPE_RPI_LIBCAMERA_RPIF_V3_IMX708){ + } else if (camera_type == + X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_SKYMASTERHDR_IMX708 || + camera_type == X_CAM_TYPE_RPI_LIBCAMERA_RPIF_V3_IMX708) { ret.push_back(ResolutionFramerate{640, 480, 60}); ret.push_back(ResolutionFramerate{896, 504, 60}); ret.push_back(ResolutionFramerate{1280, 720, 60}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - }else if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX327) { + } else if (camera_type == X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX327) { ret.push_back(ResolutionFramerate{640, 480, 60}); ret.push_back(ResolutionFramerate{896, 504, 60}); ret.push_back(ResolutionFramerate{1280, 720, 60}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - }else if(camera_type==X_CAM_TYPE_RPI_LIBCAMERA_RPIF_V1_OV5647){ + } else if (camera_type == X_CAM_TYPE_RPI_LIBCAMERA_RPIF_V1_OV5647) { ret.push_back(ResolutionFramerate{1280, 720, 30}); ret.push_back(ResolutionFramerate{1920, 1080, 30}); - } - else{ - std::cerr<<"Not yet mapped:"<