Skip to content

Commit

Permalink
Patch Power-Level support
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle authored Nov 16, 2024
1 parent d202ec6 commit 49145ff
Showing 1 changed file with 50 additions and 12 deletions.
62 changes: 50 additions & 12 deletions qml/ui/configpopup/openhd_settings/PopupTxPowerEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ PopupBigGeneric{
ListElement {title: "LB-Link [RTL88XXEU]"; value: 0}
ListElement {title: "OpenHD [RTL88XXEU]"; value: 1}
ListElement {title: "OTHER [RTL88XXEU]"; value: 2}
}
ListModel{
id: model_qualcomm_manufacturers
ListElement {title: "Please Select"; value: -1}
ListElement {title: "Coretronic"; value: 0}
ListElement {title: "OTHER"; value: 1}
}

function get_model_manufacturer_for_chip_type(){
Expand All @@ -123,6 +129,8 @@ PopupBigGeneric{
return model_rtl8812bu_manufacturers;
}else if(chip_type==3){
return model_rtl8812eu_manufacturers;
}else if(chip_type==4){
return model_qualcomm_manufacturers;
}
return model_manufacturer_unknown_chipset;
}
Expand Down Expand Up @@ -185,27 +193,51 @@ PopupBigGeneric{
ListElement {title: "<=1000mW (maybe)"; value: 1000}
ListElement {title: "<=20000mW (maybe)"; value: 2000}
}
//RTL8812EU begin
//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}
ListElement {title: "~25mW"; value: 25}
ListElement {title: "~100mW"; value: 100}
ListElement {title: "~300mW"; value: 300}
ListElement {title: "~500mW"; value: 500}
ListElement {title: "~800mW"; value: 800}
ListElement {title: "~1000mW"; value: 1000}
}
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}
ListElement {title: "~25mW"; value: 25}
ListElement {title: "~100mW"; value: 100}
ListElement {title: "~300mW"; value: 300}
ListElement {title: "~500mW"; value: 500}
ListElement {title: "~800mW"; value: 800}
ListElement {title: "~1000mW"; value: 1000}
}
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}
ListElement {title: "~25mW"; value: 25}
ListElement {title: "~100mW"; value: 100}
ListElement {title: "~300mW"; value: 300}
ListElement {title: "~500mW"; value: 500}
ListElement {title: "~800mW"; value: 800}
ListElement {title: "~1000mW"; value: 1000}
}
//QUALCOMM begin
ListModel{
id: model_qualcomm_manufacturer_coretronic
ListElement {title: "Please select"; value: -1}
ListElement {title: "~30mw"; value: 30}
ListElement {title: "~100mW"; value: 100}
ListElement {title: "~200mW"; value: 200}
}
ListModel{
id: model_qualcomm_manufacturer_generic
ListElement {title: "Please select"; value: -1}
ListElement {title: "~30mw"; value: 30}
ListElement {title: "~100mW"; value: 100}
ListElement {title: "~200mW"; value: 200}
}

// Such that we can copy and add the extra value for "NOT ENABLED"
Expand Down Expand Up @@ -249,6 +281,13 @@ PopupBigGeneric{
}else {
ret = model_rtl8812eu_manufacturer_generic;
}
}else if(chip_type==4){
// QUALCOMM
if(manufacturer==0){
ret= model_qualcomm_manufacturer_coretronic;
}else {
ret = model_qualcomm_manufacturer_generic;
}
}else{
ret = model_error;
}
Expand Down Expand Up @@ -492,5 +531,4 @@ PopupBigGeneric{
}
// ----------------
}
}

}

0 comments on commit 49145ff

Please sign in to comment.