Skip to content
Open
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
Next Next commit
[preferences] returning the response of the modem when putting bytes
  • Loading branch information
andreagilardoni committed Dec 2, 2024
commit 76ff27d37d07dd050e3fda75b5a82d75956843a4
4 changes: 2 additions & 2 deletions libraries/Preferences/src/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ size_t Preferences::putBytes(const char* key, const void* value, size_t len) {
string res = "";
if ( key != nullptr && strlen(key) > 0 && value != nullptr && len > 0) {
modem.write_nowait(string(PROMPT(_PREF_PUT)), res, "%s%s,%d,%d\r\n", CMD_WRITE(_PREF_PUT), key, PT_BLOB, len);
if(modem.passthrough((uint8_t *)value, len)) {
return len;
if(modem.passthrough((uint8_t *)value, len, &res)) {
return atoi(res.c_str());
}
}
return 0;
Expand Down