Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

LTE: fix conditional in lte_check_attached #520

Open
wants to merge 1 commit into
base: Dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions esp32/mods/modlte.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ static bool lte_check_attached(bool legacy) {
mp_hal_delay_ms(LTE_RX_TIMEOUT_MIN_MS);
lte_push_at_command("AT+CEREG?", LTE_RX_TIMEOUT_MIN_MS);
}
if (((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5")))
&& (strlen(pos) >= 31) && (pos[30] == '7' || pos[30] == '9')) {
if ((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) {
attached = true;
}
} else {
Expand Down