diff --git a/app/telemetry/models/openhd_core/camera.hpp b/app/telemetry/models/openhd_core/camera.hpp index dbc7b1158..47aaa10f1 100644 --- a/app/telemetry/models/openhd_core/camera.hpp +++ b/app/telemetry/models/openhd_core/camera.hpp @@ -74,7 +74,13 @@ static constexpr int X_CAM_TYPE_RPI_V4L2_VEYE_MVCAM = 63; // X20 Specific starts here // // Right now we only have one camera, but more (might) follow. -static constexpr int X_CAM_TYPE_X20_RUNCAM_GENERIC = 70; +// Generic - camera(s) that don't support any IQ params or changing settings. +// For example the Foxeer cameras, or old runcam cameras +static constexpr int X_CAM_TYPE_X20_HDZERO_GENERIC = 70; +static constexpr int X_CAM_TYPE_X20_HDZERO_RUNCAM_V1 = 71; +static constexpr int X_CAM_TYPE_X20_HDZERO_RUNCAM_V2 = 72; +static constexpr int X_CAM_TYPE_X20_HDZERO_RUNCAM_V3 = 73; +static constexpr int X_CAM_TYPE_X20_HDZERO_RUNCAM_NANO_90 = 74; // ... 9 reserved for future use // // ROCK Specific starts here @@ -145,8 +151,16 @@ static std::string x_cam_type_to_string(int camera_type) { case X_CAM_TYPE_RPI_V4L2_VEYE_MVCAM: return "VEYE_MVCAM"; // All the x20 begin - case X_CAM_TYPE_X20_RUNCAM_GENERIC: - return "X20_RUNCAM_GENERIC"; + case X_CAM_TYPE_X20_HDZERO_GENERIC: + return "X20_HDZERO_GENERIC"; + case X_CAM_TYPE_X20_HDZERO_RUNCAM_V1: + return "X20_HDZERO_RUNCAM_V1"; + case X_CAM_TYPE_X20_HDZERO_RUNCAM_V2: + return "X20_HDZERO_RUNCAM_V2"; + case X_CAM_TYPE_X20_HDZERO_RUNCAM_V3: + return "X20_HDZERO_RUNCAM_V3"; + case X_CAM_TYPE_X20_HDZERO_RUNCAM_NANO_90: + return "X20_HDZERO_RUNCAM_NANO"; // All the rock begin case X_CAM_TYPE_ROCK_HDMI_IN: return "ROCK_HDMI_IN"; @@ -201,6 +215,10 @@ struct XCamera { bool requires_x20_cedar_pipeline() const { return camera_type >= 70 && camera_type < 80; } + bool x20_supports_basic_iq_params() const { + return requires_x20_cedar_pipeline() && + camera_type != X_CAM_TYPE_X20_HDZERO_GENERIC; + } bool requires_rockchip_mpp_pipeline() const { return camera_type >= 80 && camera_type < 90; } @@ -510,11 +528,22 @@ static std::vector get_camera_choices_for_platform( MANUFACTURER_USB, MANUFACTURER_DEBUG}; } else if (platform_type == X_PLATFORM_TYPE_ALWINNER_X20) { + // On the X20, we have auto detection of the camera type, + // But we still populate the UI like for platforms where the user has to + // select the cam type. + std::vector generic_cameras{ + CameraNameAndType{"GENERIC", X_CAM_TYPE_X20_HDZERO_GENERIC}, + }; std::vector runcam_cameras{ - CameraNameAndType{"GENERIC", X_CAM_TYPE_X20_RUNCAM_GENERIC}, + CameraNameAndType{"RUNCAM V1", X_CAM_TYPE_X20_HDZERO_RUNCAM_V1}, + CameraNameAndType{"RUNCAM V2", X_CAM_TYPE_X20_HDZERO_RUNCAM_V2}, + CameraNameAndType{"RUNCAM V3", X_CAM_TYPE_X20_HDZERO_RUNCAM_V3}, + CameraNameAndType{"RUNCAM NANO 90", + X_CAM_TYPE_X20_HDZERO_RUNCAM_NANO_90}, }; return std::vector{ - ManufacturerForPlatform{"HDZERO", runcam_cameras}}; + ManufacturerForPlatform{"HDZERO", generic_cameras}, + ManufacturerForPlatform{"RUNCAM", runcam_cameras}}; } else if (platform_type == X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W) { std::vector arducam_cameras{ CameraNameAndType{"IMX219", X_CAM_TYPE_ROCK_RK3566_IMX219}, diff --git a/app/telemetry/settings/documentedparam.cpp b/app/telemetry/settings/documentedparam.cpp index 22950180a..c7606b177 100644 --- a/app/telemetry/settings/documentedparam.cpp +++ b/app/telemetry/settings/documentedparam.cpp @@ -530,7 +530,7 @@ static std::vector> get_parameters_list(){ { auto fc_uart_conn_values=std::vector{ {"disable",""}, - {"SERIAL_0","SERIAL_0"}, + {"OHD TELEMETRY 0","OHD_TELEMETRY_0"}, {"/dev/serial0","/dev/serial0"}, {"/dev/serial1","/dev/serial1"}, {"/dev/ttyS1","/dev/ttyS1"}, @@ -541,7 +541,7 @@ static std::vector> get_parameters_list(){ {"/dev/ttyS7","/dev/ttyS7"} }; append_string(ret,"FC_UART_CONN",ImprovedStringSetting{fc_uart_conn_values}, - "Telemetry FC<->Air unit. Make sure FC_UART_BAUD matches your FC. SERIAL_0 - default, primary telemetry serial of this platform (see wiki)." + "Telemetry FC<->Air unit. Make sure FC_UART_BAUD matches your FC. OHD TELEMETRY 0 - default, primary telemetry serial of this platform (see wiki)." "Otherwise, any linux serial fd filename (dev/testing)."); //same for ground uart out append_string(ret,"TRACKER_UART_OUT",ImprovedStringSetting{fc_uart_conn_values},