Skip to content

Commit

Permalink
[preferences] adding getType command
Browse files Browse the repository at this point in the history
  • Loading branch information
andreagilardoni authored and pennam committed Nov 27, 2024
1 parent 69dbc7d commit 0f3333b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/Preferences/src/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ size_t Preferences::putBytes(const char* key, const void* value, size_t len) {
PreferenceType Preferences::getType(const char* key) {
string res = "";
if (key != nullptr && strlen(key) > 0) {
if (modem.write(string(PROMPT(_PREF_PUT)), res, "%s%s\r\n", CMD_WRITE(_PREF_PUT), key)) {
if (modem.write(string(PROMPT(_PREF_TYPE)), res, "%s%s\r\n", CMD_WRITE(_PREF_TYPE), key)) {
return static_cast<PreferenceType>(atoi(res.c_str()));
}
}
Expand Down

0 comments on commit 0f3333b

Please sign in to comment.