made getCurrentSettings to only run when band parsing were finished

This commit is contained in:
Russel Yasol
2024-05-09 19:50:43 +08:00
parent 10d93c733e
commit b56c5c5652

View File

@@ -458,12 +458,14 @@
getSupportedBands() { getSupportedBands() {
const atcmd = 'AT+QNWPREFCFG="policy_band"'; const atcmd = 'AT+QNWPREFCFG="policy_band"';
this.sendATcommand(atcmd).then((rawdata) => { this.sendATcommand(atcmd)
this.rawdata = rawdata; .then((rawdata) => {
this.parseSupportedBands(rawdata); this.rawdata = rawdata;
}).then(() => { this.parseSupportedBands(rawdata);
this.getLockedBands(); })
}); .then(() => {
this.getLockedBands();
});
}, },
parseSupportedBands(rawdata) { parseSupportedBands(rawdata) {
@@ -490,10 +492,15 @@
const atcmd = const atcmd =
'AT+QNWPREFCFG="lte_band";+QNWPREFCFG= "nsa_nr5g_band";+QNWPREFCFG= "nr5g_band"'; 'AT+QNWPREFCFG="lte_band";+QNWPREFCFG= "nsa_nr5g_band";+QNWPREFCFG= "nr5g_band"';
this.sendATcommand(atcmd).then((rawdata) => { this.sendATcommand(atcmd)
this.rawdata = rawdata; .then((rawdata) => {
this.parseLockedBands(rawdata); this.rawdata = rawdata;
}); this.parseLockedBands(rawdata);
})
.then(() => {
// Call current settings
this.getCurrentSettings();
});
}, },
parseLockedBands(rawdata) { parseLockedBands(rawdata) {
@@ -524,9 +531,6 @@
this.locked_sa_bands, this.locked_sa_bands,
this this
); );
// Call current settings
this.getCurrentSettings();
}, },
init() { init() {