Skip to content

Commit 7d8b292

Browse files
authored
Update to version 1.0.5-20231008
- I added a preview of the bus speed.
1 parent 2e187de commit 7d8b292

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

luci-app-modemdefine/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LUCI_DESCRIPTION:=LuCI JS interface to define the available modems. The list of
1212
MAINTAINER:=Rafał Wabik <4Rafal@gmail.com>
1313
LUCI_DEPENDS:=
1414
LUCI_PKGARCH:=all
15-
PKG_VERSION:=1.0.4-20230711
15+
PKG_VERSION:=1.0.5-20231008
1616

1717
define Package/luci-app-modemdefine/conffiles
1818
/etc/config/modemdefine

luci-app-modemdefine/htdocs/luci-static/resources/view/modem/modemdefine.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,20 @@ return view.extend({
5454
let product = '';
5555
let serialnumber = '';
5656
let driver = '';
57+
let bus = '';
5758

5859
for (const line of lines) {
5960
if (line.includes('Driver=hub') || line.includes('Driver=usb-storage') || line.includes('Driver=usblp') ) {
6061
driver = line.split('Driver=')[1].trim();
6162
break;
6263
}
64+
65+
if (line.includes('Spd=')) {
66+
const match = line.match(/Spd=([^ ]+)/);
67+
if (match && match[1]) {
68+
bus = match[1].trim();
69+
}
70+
}
6371

6472
if (line.includes('Vendor=')) {
6573
const match = line.match(/Vendor=([^ ]+)/);
@@ -103,7 +111,8 @@ return view.extend({
103111
Product: product,
104112
Vendor: vendor,
105113
ProdID: pid,
106-
SerialNumber: serialnumber
114+
Bus_speed: bus,
115+
Serial_Number: serialnumber
107116
};
108117
results.push(result);
109118
}

0 commit comments

Comments
 (0)