diff --git a/app/telemetry/models/openhd_core/camera.hpp b/app/telemetry/models/openhd_core/camera.hpp index 825b01767..28b4df52d 100644 --- a/app/telemetry/models/openhd_core/camera.hpp +++ b/app/telemetry/models/openhd_core/camera.hpp @@ -113,7 +113,9 @@ static constexpr int X_CAM_TYPE_ROCK_3_VEYE = 97; static constexpr int X_CAM_TYPE_NVIDIA_XAVIER_IMX577 = 101; // OpenIPC specific starts here static constexpr int X_CAM_TYPE_OPENIPC_GENERIC = 110; -static constexpr int X_CAM_TYPE_QC_Coretronic_IMX577 = 120; +static constexpr int X_CAM_TYPE_QC_IMX577 = 120; +static constexpr int X_CAM_TYPE_QC_OV9282 = 121; + // // ... rest is reserved for future use // no camera, only exists to have a default value for secondary camera (which is @@ -229,8 +231,10 @@ static std::string x_cam_type_to_string(int camera_type) { return "OPENIPC_X"; case X_CAM_TYPE_NVIDIA_XAVIER_IMX577: return "XAVIER_IMX577"; - case X_CAM_TYPE_QC_Coretronic_IMX577: + case X_CAM_TYPE_QC_IMX577: return "CORETRONIC IMX577"; + case X_CAM_TYPE_QC_OV9282: + return "CORETRONIC OV9282"; default: break; } @@ -514,10 +518,16 @@ struct XCamera { ret.push_back(ResolutionFramerate{1280, 720, 60}); ret.push_back(ResolutionFramerate{1920, 1080, 60}); return ret; - } else if (camera_type == X_CAM_TYPE_QC_Coretronic_IMX577) { + } else if (camera_type == X_CAM_TYPE_QC_IMX577) { std::vector ret; - ret.push_back(ResolutionFramerate{1280, 720, 60}); - ret.push_back(ResolutionFramerate{1920, 1080, 60}); + // very basic integration, driver is missing a lot of settings + ret.push_back(ResolutionFramerate{1280, 720, 30}); + ret.push_back(ResolutionFramerate{1920, 1080, 30}); + return ret; + } else if (camera_type == X_CAM_TYPE_QC_OV9282) { + std::vector ret; + // correct specs still missing + ret.push_back(ResolutionFramerate{1280, 720, 30}); return ret; } // Not mapped yet diff --git a/app/telemetry/models/openhd_core/platform.hpp b/app/telemetry/models/openhd_core/platform.hpp index 238c8bd1f..9df44bc0a 100644 --- a/app/telemetry/models/openhd_core/platform.hpp +++ b/app/telemetry/models/openhd_core/platform.hpp @@ -27,8 +27,9 @@ static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W = 20; // Zero 3 W static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5_A = 21; static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5_B = 22; +static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_CM3 = 24; + static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RV1126_UNDEFINED = 23; // FUTURE -static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_CM3 = 24; // FUTURE // Numbers 30..35 are reserved for allwinner static constexpr int X_PLATFORM_TYPE_ALWINNER_X20 = 30; @@ -36,9 +37,13 @@ static constexpr int X_PLATFORM_TYPE_ALWINNER_X20 = 30; // @Buldo is working on openipc / sigmastar, 36..39 static constexpr int X_PLATFORM_TYPE_OPENIPC_SIGMASTAR_UNDEFINED = 36; -// Numbers 40..50 are reserved for NVIDIA +// Numbers 40..45 are reserved for NVIDIA static constexpr int X_PLATFORM_TYPE_NVIDIA_XAVIER = 40; +// Numbers 46..50 are reserved for QUALCOMM +static constexpr int X_PLATFORM_TYPE_QUALCOMM_QRB5165 = 46; +static constexpr int X_PLATFORM_TYPE_QUALCOMM_QCS405 = 47; +static constexpr int X_PLATFORM_TYPE_QUALCOMM_UNKNOWN = 48; static std::string x_platform_type_to_string(int platform_type) { switch (platform_type) { case X_PLATFORM_TYPE_UNKNOWN: @@ -79,4 +84,4 @@ static std::string x_platform_type_to_string(int platform_type) { -#endif // PLATFORM_HPP +#endif // PLATFORM_HPP \ No newline at end of file diff --git a/app/telemetry/models/wificard.cpp b/app/telemetry/models/wificard.cpp index 9d6182adc..4bc6b434f 100644 --- a/app/telemetry/models/wificard.cpp +++ b/app/telemetry/models/wificard.cpp @@ -45,7 +45,7 @@ static QString tx_power_unit_for_card(const int card_type){ if(card_type==0){ // OpenHD RTL8812AU return "TPI"; - }else if(card_type==1){ + }else if(card_type==1||card_type==3){ return "mW"; } return " ?mW"; diff --git a/qml/ui/configpopup/openhd_settings/PopupTxPowerEditor.qml b/qml/ui/configpopup/openhd_settings/PopupTxPowerEditor.qml index 53561dead..546e80e2d 100644 --- a/qml/ui/configpopup/openhd_settings/PopupTxPowerEditor.qml +++ b/qml/ui/configpopup/openhd_settings/PopupTxPowerEditor.qml @@ -39,7 +39,7 @@ PopupBigGeneric{ _qopenhd.show_toast("WARNING: Changing TX power while armed is not recommended !"); } var card_chipset_type=get_chipset_type(); - if(!(card_chipset_type==0 || card_chipset_type==1)){ + if(!(card_chipset_type==0 || card_chipset_type==1 || card_chipset_type==3)){ _messageBoxInstance.set_text_and_show("Changing tx power is only possible on openhd supported cards."); return; } @@ -107,6 +107,13 @@ PopupBigGeneric{ ListElement {title: "COMFAST [RTL88XXBU]"; value: 0} ListElement {title: "OTHER [RTL88XXBU]"; value: 1} } + ListModel{ + id: model_rtl8812eu_manufacturers + ListElement {title: "Please Select"; value: -1} + ListElement {title: "LB-Link [RTL88XXEU]"; value: 0} + ListElement {title: "OpenHD [RTL88XXEU]"; value: 1} + ListElement {title: "OTHER [RTL88XXEU]"; value: 2} + } function get_model_manufacturer_for_chip_type(){ var chip_type=get_chipset_type(); @@ -114,6 +121,8 @@ PopupBigGeneric{ return model_rtl8812au_manufacturers; }else if(chip_type==1){ return model_rtl8812bu_manufacturers; + }else if(chip_type==3){ + return model_rtl8812eu_manufacturers; } return model_manufacturer_unknown_chipset; } @@ -176,6 +185,28 @@ PopupBigGeneric{ ListElement {title: "<=1000mW (maybe)"; value: 1000} ListElement {title: "<=20000mW (maybe)"; value: 2000} } + //RTL8812EU begin + ListModel{ + id: model_rtl8812eu_manufacturer_lb_link + ListElement {title: "Please select"; value: -1} + ListElement {title: "~300mW"; value: 25} + ListElement {title: "~800mW"; value: 100} + ListElement {title: "~1000mW"; value: 200} + } + ListModel{ + id: model_rtl8812eu_manufacturer_openhd + ListElement {title: "Please select"; value: -1} + ListElement {title: "~300mW"; value: 25} + ListElement {title: "~800mW"; value: 100} + ListElement {title: "~1000mW"; value: 200} + } + ListModel{ + id: model_rtl8812eu_manufacturer_generic + ListElement {title: "Please select"; value: -1} + ListElement {title: "~300mW"; value: 25} + ListElement {title: "~800mW"; value: 100} + ListElement {title: "~1000mW"; value: 200} + } // Such that we can copy and add the extra value for "NOT ENABLED" ListModel{ @@ -209,6 +240,15 @@ PopupBigGeneric{ }else{ ret = model_rtl8812bu_manufacturer_generic; } + }else if(chip_type==3){ + // RTL8812EU + if(manufacturer==0){ + ret= model_rtl8812eu_manufacturer_openhd; + }else if(manufacturer==1){ + ret = model_rtl8812eu_manufacturer_lb_link; + }else { + ret = model_rtl8812eu_manufacturer_generic; + } }else{ ret = model_error; } diff --git a/qml/ui/sidebar/MappedMavlinkChoices.qml b/qml/ui/sidebar/MappedMavlinkChoices.qml index 1c4496035..bd6a6df28 100644 --- a/qml/ui/sidebar/MappedMavlinkChoices.qml +++ b/qml/ui/sidebar/MappedMavlinkChoices.qml @@ -164,6 +164,13 @@ Item { ListElement {value: 20; verbose:"20Mhz"} ListElement {value: 40; verbose:"40Mhz\n(HIGH BW)"} } + ListModel{ + id: elements_frequency_scan + ListElement {value: 0; verbose:"OHD"} + ListElement {value: 1; verbose:"5.8"} + ListElement {value: 2; verbose:"2.4"} + ListElement {value: 3; verbose:"ALL"} + } ListModel{ id: elements_model_rate ListElement {value: 0; verbose:"MCS0\n(LONG RANGE)"} @@ -198,6 +205,8 @@ Item { return frequencies_model_with_5180mhz_lowband } return frequencies_model; + }else if(param_id=="FREQUENCY_SCAN"){ + return elements_frequency_scan; }else if(param_id=="CHANNEL_WIDTH"){ return elements_model_channel_width; }else if(param_id=="RATE"){ diff --git a/qml/ui/sidebar/MavlinkChoiceElement.qml b/qml/ui/sidebar/MavlinkChoiceElement.qml index 684219526..3f483efcc 100644 --- a/qml/ui/sidebar/MavlinkChoiceElement.qml +++ b/qml/ui/sidebar/MavlinkChoiceElement.qml @@ -26,7 +26,13 @@ BaseJoyEditElement{ property var m_settings_model: _ohdSystemGroundSettings // Int param is much more common, but string param is also possible property bool override_takes_string_param: false - + ListModel{ + id: elements_frequency_scan + ListElement {value: 0; verbose:"OHD"} + ListElement {value: 1; verbose:"5.8"} + ListElement {value: 2; verbose:"2.4"} + ListElement {value: 3; verbose:"ALL"} + } ListModel{ id: elements_model_brightness ListElement {value: 0; verbose:"0%"} @@ -150,6 +156,8 @@ BaseJoyEditElement{ property string m_actual_value_string: "" function get_model(){ + }else if(param_id=="FREQUENCY_SCAN"){ + return elements_frequency_scan; if(m_param_id=="BRIGHTNESS"){ return elements_model_brightness; }else if(m_param_id=="SATURATION"){ diff --git a/qml/ui/sidebar/MavlinkChoiceElement2.qml b/qml/ui/sidebar/MavlinkChoiceElement2.qml index bdfab8f9d..de01fb4e5 100644 --- a/qml/ui/sidebar/MavlinkChoiceElement2.qml +++ b/qml/ui/sidebar/MavlinkChoiceElement2.qml @@ -35,6 +35,7 @@ BaseJoyEditElement2{ // EXTRA property string mPARAM_ID_CHANNEL_WIDTH: "CHANNEL_WIDTH" property string mPARAM_ID_FREQUENCY: "FREQUENCY" + property string mPARAM_ID_FREQUENCY_SCAN: "FREQUENCY_SCAN" property string mPARAM_ID_RATE: "RATE" @@ -119,8 +120,7 @@ BaseJoyEditElement2{ property string populate_display_text:"I SHOULD NEVER APPEAR" function populate(){ - // Don't mind those 3 - if(m_param_id==mPARAM_ID_CHANNEL_WIDTH || m_param_id==mPARAM_ID_FREQUENCY || m_param_id==mPARAM_ID_RATE){ + if(m_param_id==mPARAM_ID_CHANNEL_WIDTH || m_param_id==mPARAM_ID_FREQUENCY || mPARAM_ID_FREQUENCY_SCAN || m_param_id==mPARAM_ID_RATE){ return; } // First, check if the system is alive @@ -189,7 +189,7 @@ BaseJoyEditElement2{ function user_selected_value(value_new){ // A few need to be handled specially - if(m_param_id==mPARAM_ID_FREQUENCY){ + if(m_param_id==mPARAM_ID_FREQUENCY || m_param_id==mPARAM_ID_FREQUENCY_SCAN){ if(_fcMavlinkSystem.armed){ if(settings.dev_allow_freq_change_when_armed){ // okay @@ -204,6 +204,11 @@ BaseJoyEditElement2{ _qopenhd.set_busy_for_milliseconds(2000,"CHANGING FREQUENCY"); _wbLinkSettingsHelper.change_param_air_and_ground_frequency(value_new) return; + }else if(m_param_id==mPARAM_ID_FREQUENCY_SCAN){ + const frequency_scan=value_new; + _qopenhd.set_busy_for_milliseconds(2000,"Starting scan"); + //PLATZHALTER + return; }else if(m_param_id==mPARAM_ID_CHANNEL_WIDTH){ const channel_width_mhz=value_new; if(!_ohdSystemAir.is_alive){ @@ -242,8 +247,13 @@ BaseJoyEditElement2{ onCurr_bandwidth_mhzChanged: { extra_populate(); } + property bool curr_frequency_scan: (_ohdSystemGround.wb_gnd_operating_mode == 0) + onCurr_frequency_scanChanged: { + extra_populate(); + } + function extra_populate(){ - if(!(m_param_id==mPARAM_ID_CHANNEL_WIDTH || m_param_id==mPARAM_ID_FREQUENCY || m_param_id==mPARAM_ID_RATE)){ + if(!(m_param_id==mPARAM_ID_CHANNEL_WIDTH || m_param_id==mPARAM_ID_FREQUENCY || mPARAM_ID_FREQUENCY_SCAN || m_param_id==mPARAM_ID_RATE )){ return; } // First, check if the system is alive @@ -253,6 +263,10 @@ BaseJoyEditElement2{ populate_display_text="N/A"; return; } + if(m_param_id==mPARAM_ID_FREQUENCY_SCAN){ + populate_display_text="Debug"; + return; + } if(m_param_id==mPARAM_ID_FREQUENCY){ if(curr_channel_mhz<=0){ m_param_exists=false; @@ -279,5 +293,4 @@ BaseJoyEditElement2{ m_param_exists=true; } } - -} +} \ No newline at end of file diff --git a/qml/ui/sidebar/Panel1Link.qml b/qml/ui/sidebar/Panel1Link.qml index 6cc8f07d4..f2063f955 100644 --- a/qml/ui/sidebar/Panel1Link.qml +++ b/qml/ui/sidebar/Panel1Link.qml @@ -50,6 +50,18 @@ SideBarBasePanel{ onGoto_previous: { sidebar.regain_control_on_sidebar_stack() } + onGoto_next: { + scan_frequency_element.takeover_control() + } + } + MavlinkChoiceElement2{ + id:scan_frequency_element + m_title: "Scan for Air" + m_param_id: mPARAM_ID_FREQUENCY_SCAN + m_settings_model: _ohdSystemGroundSettings + onGoto_previous: { + edit_frequency_element.takeover_control(); + } onGoto_next: { edit_channel_width_element.takeover_control() }