mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +00:00
Mobile/rememberDC: update matching logic
Update the matching logic to account for known and unknown BT DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
0f588f5227
commit
e7fd50113f
1 changed files with 9 additions and 4 deletions
|
@ -182,17 +182,22 @@ Kirigami.Page {
|
|||
dc1.enabled = dc2.enabled = dc3.enabled = dc4.enabled = true
|
||||
for (var i = 1; i < 5; i++) {
|
||||
if (comboProduct.currentIndex === -1 && currentText === "FTDI"){
|
||||
if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText){
|
||||
if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText)
|
||||
rememberedDCsGrid.setDC(eval("PrefDiveComputer.vendor" + i), eval("PrefDiveComputer.product" + i), ("PrefDiveComputer.device" + i))
|
||||
}
|
||||
}else if (comboProduct.currentIndex !== -1 && currentText === "FTDI") {
|
||||
if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText){
|
||||
if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText) {
|
||||
eval("dc"+ i + ".enabled = false")
|
||||
break
|
||||
}
|
||||
}else if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.product" + i) +" " + eval("PrefDiveComputer.device" + i).toUpperCase() === currentText){
|
||||
}else if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.product" + i) +" " + eval("PrefDiveComputer.device" + i) === currentText) {
|
||||
eval("dc"+ i + ".enabled = false")
|
||||
break
|
||||
}else if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.device" + i) === currentText) {
|
||||
eval("dc"+ i + ".enabled = false")
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue