From b56c5c5652a9aeece88aed3bd03eb8777b4f1d14 Mon Sep 17 00:00:00 2001 From: Russel Yasol Date: Thu, 9 May 2024 19:50:43 +0800 Subject: [PATCH] made getCurrentSettings to only run when band parsing were finished --- simpleadmin/www/network.html | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/simpleadmin/www/network.html b/simpleadmin/www/network.html index f6b970b..737322d 100644 --- a/simpleadmin/www/network.html +++ b/simpleadmin/www/network.html @@ -458,12 +458,14 @@ getSupportedBands() { const atcmd = 'AT+QNWPREFCFG="policy_band"'; - this.sendATcommand(atcmd).then((rawdata) => { - this.rawdata = rawdata; - this.parseSupportedBands(rawdata); - }).then(() => { - this.getLockedBands(); - }); + this.sendATcommand(atcmd) + .then((rawdata) => { + this.rawdata = rawdata; + this.parseSupportedBands(rawdata); + }) + .then(() => { + this.getLockedBands(); + }); }, parseSupportedBands(rawdata) { @@ -490,10 +492,15 @@ const atcmd = 'AT+QNWPREFCFG="lte_band";+QNWPREFCFG= "nsa_nr5g_band";+QNWPREFCFG= "nr5g_band"'; - this.sendATcommand(atcmd).then((rawdata) => { - this.rawdata = rawdata; - this.parseLockedBands(rawdata); - }); + this.sendATcommand(atcmd) + .then((rawdata) => { + this.rawdata = rawdata; + this.parseLockedBands(rawdata); + }) + .then(() => { + // Call current settings + this.getCurrentSettings(); + }); }, parseLockedBands(rawdata) { @@ -524,9 +531,6 @@ this.locked_sa_bands, this ); - - // Call current settings - this.getCurrentSettings(); }, init() {