Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Improve code readability
  • Loading branch information
mgcookson authored Mar 18, 2025
commit f048f7f439ff4051152c1ab96819a557c34dd2ae
8 changes: 4 additions & 4 deletions libraries/WiFiS3/src/Modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,16 @@ ModemClass::ParseResult ModemClass::buf_read(const string &prompt, string &data_
* in case multiple parameters separated by ',' are sent, they will be present in data_res
* - if we encounter <CR> we need to wait for <LF>
* - if we encounter <LF> we need to parse the response status
* - if we encounter '|', the next token will contain binary sized data, the current value in
* - if we encounter '|', the next token will contain binary sized data, the current value
* in data_res contains the length of the next token
*/

if(c == '|') { // sized read, the previous parameter is the length
state = at_parse_state_t::Sized;

sized_read_size = atoi(data_res.c_str());
data_res.clear();
if (sized_read_size == 0) {
if (sized_read_size != 0) {
state = at_parse_state_t::Sized;
} else {
state = at_parse_state_t::Res;
}
} else if(c == '\r') {
Expand Down
Loading