Skip to content

Commit 316a728

Browse files
authored
Upgrade to 1.0.52-20230711
Fix for cooperation with the luci-app-modemdefine package.
1 parent 3f0c60e commit 316a728

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

luci-app-3ginfo-lite/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MAINTAINER:=Rafał Wabik <4Rafal@gmail.com>
1212
LUCI_DESCRIPTION:=LuCI JS interface for the 3ginfo-lite. The package allows you to view the parameters of the mobile internet connection.
1313
LUCI_DEPENDS:=+sms-tool +comgt
1414
LUCI_PKGARCH:=all
15-
PKG_VERSION:=1.0.51-20230710
15+
PKG_VERSION:=1.0.52-20230711
1616

1717
include $(TOPDIR)/feeds/luci/luci.mk
1818

luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdetail.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ modemDialog: baseclass.extend({
229229
var portM = sections.length;
230230

231231
var result = "";
232-
for (let i = 1; i < portM; i++) {
232+
for (var i = 1; i < portM; i++) {
233233
result += sections[i].comm_port + '#' + sections[i].modem + ' (' + sections[i].user_desc + ');';
234234
}
235235
var result = result.slice(0, -1);
@@ -279,11 +279,11 @@ modemDialog: baseclass.extend({
279279

280280
handleSave: function(ev) {
281281

282-
return uci.load('3ginfo').then(function() {
282+
return uci.load('modemdefine').then(function() {
283283

284284
var vx = document.getElementById('mselect').value;
285285

286-
uci.set('3ginfo', '@3ginfo[0]', 'device', vx.toString());
286+
uci.set('modemdefine', '@general[0]', 'main_modem', vx.toString());
287287

288288
uci.save();
289289
uci.apply();

luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/detect.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
#
88

99
# from config modemdefine
10+
DEVICE=$(uci -q get modemdefine.@general[0].main_modem)
11+
if [ -n "$DEVICE" ]; then
12+
echo $DEVICE
13+
exit 0
14+
fi
15+
1016
DEVICE=$(uci -q get modemdefine.@modemdefine[0].comm_port)
1117
if [ -n "$DEVICE" ]; then
1218
echo $DEVICE

luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/2c7c0800

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ if [ "x$MODE_NUM" = "x7" ]; then
8282
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
8383
if [ "x$T" = "xLTE" ]; then
8484
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
85-
T_DEC=$(printf "%d" "0x$T")
86-
T_HEX=$T
85+
TAC_DEC=$(printf "%d" "0x$T")
86+
TAC_HEX=$T
8787
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
8888
SINR=$T
8989

luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/2c7c0801

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ if [ "x$MODE_NUM" = "x7" ]; then
8383
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
8484
if [ "x$T" = "xLTE" ]; then
8585
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
86-
T_DEC=$(printf "%d" "0x$T")
87-
T_HEX=$T
86+
TAC_DEC=$(printf "%d" "0x$T")
87+
TAC_HEX=$T
8888
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
8989
SINR=$T
9090

0 commit comments

Comments
 (0)