Merge pull request #163 from clndwhr/bug/fix-bandwidth-reporting-and-adjust-tac
[BUG FIX] Bandwidth reporting and TAC Adjustment
This commit is contained in:
6143
simpleadmin/www/css/all.min.css
vendored
Normal file
6143
simpleadmin/www/css/all.min.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,86 @@
|
||||
/* import poppins */
|
||||
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
||||
|
||||
/* poppins-300 - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url('../fonts/poppins-v23-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-300italic - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
src: url('../fonts/poppins-v23-latin-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-regular - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('../fonts/poppins-v23-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-italic - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url('../fonts/poppins-v23-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-500 - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url('../fonts/poppins-v23-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-500italic - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
src: url('../fonts/poppins-v23-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-600 - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url('../fonts/poppins-v23-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-600italic - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
src: url('../fonts/poppins-v23-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-700 - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url('../fonts/poppins-v23-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* poppins-700italic - latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: url('../fonts/poppins-v23-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* import fontawesome icons */
|
||||
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css");
|
||||
@import url("./all.min.css");
|
||||
|
||||
* {
|
||||
font-family: "Poppins", sans-serif;
|
||||
|
||||
BIN
simpleadmin/www/fonts/poppins-v23-latin-300.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-300.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-300italic.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-300italic.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-500.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-500.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-500italic.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-500italic.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-600.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-600.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-600italic.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-600italic.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-700.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-700.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-700italic.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-700italic.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-italic.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-italic.woff2
Normal file
Binary file not shown.
BIN
simpleadmin/www/fonts/poppins-v23-latin-regular.woff2
Normal file
BIN
simpleadmin/www/fonts/poppins-v23-latin-regular.woff2
Normal file
Binary file not shown.
@@ -852,14 +852,15 @@
|
||||
}
|
||||
|
||||
// --- Bandwidth ---
|
||||
// find this example value from lines "+QENG: \"servingcell\"
|
||||
const bandwidth_line = lines.find((line) =>
|
||||
line.includes('+QENG: "servingcell"')
|
||||
);
|
||||
if (
|
||||
this.networkMode == "5G SA TDD" ||
|
||||
this.networkMode == "5G SA FDD"
|
||||
) {
|
||||
// find this example value from lines "+QENG: \"servingcell\"
|
||||
const bandwidth_line = lines.find((line) =>
|
||||
line.includes('+QENG: "servingcell"')
|
||||
);
|
||||
|
||||
const nr_bw = bandwidth_line.split(",")[11];
|
||||
const calculated_bandwidth = this.calculate_nr_bw(nr_bw);
|
||||
this.bandwidth = "NR " + calculated_bandwidth + " MHz";
|
||||
@@ -867,11 +868,6 @@
|
||||
this.networkMode == "4G LTE FDD" ||
|
||||
this.networkMode == "4G LTE TDD"
|
||||
) {
|
||||
// find this example value from lines "+QENG: \"servingcell\"
|
||||
const bandwidth_line = lines.find((line) =>
|
||||
line.includes('+QENG: "servingcell"')
|
||||
);
|
||||
|
||||
const lte_bw_ul = bandwidth_line.split(",")[10];
|
||||
const lte_bw_dl = bandwidth_line.split(",")[11];
|
||||
const calculated_bandwidth_ul =
|
||||
@@ -1196,11 +1192,11 @@
|
||||
currentNetworkMode == "5G SA FDD"
|
||||
) {
|
||||
// TAC
|
||||
this.tac = lines
|
||||
const localTac = lines
|
||||
.find((line) => line.includes('+QENG: "servingcell"'))
|
||||
.split(",")[8]
|
||||
.replace(/"/g, "");
|
||||
|
||||
this.tac = parseInt(localTac, 16) + " (" + localTac + ")";
|
||||
// CSQ
|
||||
this.csq = "NR-SA Mode";
|
||||
|
||||
@@ -1250,11 +1246,11 @@
|
||||
} else {
|
||||
// LTE Only
|
||||
// TAC
|
||||
this.tac = lines
|
||||
const localTac = lines
|
||||
.find((line) => line.includes('+QENG: "servingcell"'))
|
||||
.split(",")[12]
|
||||
.replace(/"/g, "");
|
||||
|
||||
this.tac = parseInt(localTac, 16) + " (" + localTac + ")";
|
||||
// CSQ
|
||||
this.csq = lines
|
||||
.find((line) => line.includes("+CSQ:"))
|
||||
@@ -1354,11 +1350,24 @@
|
||||
")";
|
||||
|
||||
// TAC
|
||||
this.tac = lines
|
||||
const localTac = lines
|
||||
.find((line) => line.includes('+QENG: "LTE"'))
|
||||
.split(",")[10]
|
||||
.replace(/"/g, "");
|
||||
this.tac = parseInt(localTac, 16) + " ("+localTac+")";
|
||||
|
||||
this.cellID =
|
||||
"Short " +
|
||||
shortCID +
|
||||
"(" +
|
||||
parseInt(shortCID, 16) +
|
||||
")" +
|
||||
", " +
|
||||
"Long " +
|
||||
longCID +
|
||||
"(" +
|
||||
parseInt(longCID, 16) +
|
||||
")";
|
||||
// CSQ
|
||||
this.csq = lines
|
||||
.find((line) => line.includes("+CSQ:"))
|
||||
@@ -1489,32 +1498,40 @@
|
||||
},
|
||||
|
||||
calculate_lte_bw(lte_bw) {
|
||||
switch (true) {
|
||||
case 0:
|
||||
return 1.4;
|
||||
case 1:
|
||||
return 3;
|
||||
// Now case 2 - 5
|
||||
case lte_bw >= 2 && lte_bw <= 5:
|
||||
return (lte_bw - 1) * 5;
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
const BANDWIDTH_MAP = {
|
||||
0: 1.4,
|
||||
1: 3,
|
||||
2: 5,
|
||||
3: 10,
|
||||
4: 15,
|
||||
5: 20,
|
||||
6: 40,
|
||||
7: 80,
|
||||
8: 100,
|
||||
9: 200,
|
||||
};
|
||||
return BANDWIDTH_MAP[lte_bw];
|
||||
},
|
||||
|
||||
calculate_nr_bw(nr_bw) {
|
||||
switch (true) {
|
||||
case nr_bw >= 0 && nr_bw <= 5:
|
||||
return (nr_bw + 1) * 5;
|
||||
case nr_bw >= 6 && nr_bw <= 12:
|
||||
return (nr_bw - 2) * 10;
|
||||
case nr_bw === 13:
|
||||
return "200";
|
||||
case nr_bw === 14:
|
||||
return "400";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
const NR_BANDWIDTH_MAP = {
|
||||
0: 5,
|
||||
1: 10,
|
||||
2: 15,
|
||||
3: 20,
|
||||
4: 25,
|
||||
5: 30,
|
||||
6: 40,
|
||||
7: 50,
|
||||
8: 60,
|
||||
9: 70,
|
||||
10: 80,
|
||||
11: 90,
|
||||
12: 100,
|
||||
13: 200,
|
||||
14: 400,
|
||||
};
|
||||
return NR_BANDWIDTH_MAP[nr_bw];
|
||||
},
|
||||
|
||||
calculateRSRPPercentage(rsrp) {
|
||||
|
||||
Reference in New Issue
Block a user