Skip to content

Commit

Permalink
Update PopupTxPowerEditor.qml
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Nov 10, 2024
1 parent 1851145 commit 0d60dcd
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions qml/ui/configpopup/openhd_settings/PopupTxPowerEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,22 @@ 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();
if(chip_type==0){
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;
}
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 0d60dcd

Please sign in to comment.