Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Skip unaligned responses from WiFi chip
  • Loading branch information
pennam committed Jul 19, 2024
commit e322670760e413f7fe7145e3a368f720fb7c47ad
12 changes: 10 additions & 2 deletions libraries/WiFiS3/src/Modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,28 +228,36 @@ bool ModemClass::buf_read(const string &prompt, string &data_res) {
}
else {
if(string::npos != data_res.rfind(RESULT_DATA)) {
found = true;
data_res = data_res.substr(0, data_res.length() - (sizeof(RESULT_DATA) - 1));
if(prompt != DO_NOT_CHECK_CMD) {
if(removeAtBegin(data_res, prompt)) {
res = true;
found = true;
} else {
data_res.clear();
continue;
}
}
else {
res = true;
found = true;
}
break;
}
else if(string::npos != data_res.rfind(RESULT_OK)){
found = true;
data_res = data_res.substr(0, data_res.length() - (sizeof(RESULT_OK) - 1) );
if(prompt != DO_NOT_CHECK_CMD) {
if(removeAtBegin(data_res, prompt)) {
res = true;
found = true;
} else {
data_res.clear();
continue;
}
}
else {
res = true;
found = true;
}
break;
}
Expand Down