Unverified Commit d08e9005 authored by Jovan Frandika's avatar Jovan Frandika Committed by GitHub

chore: add err name to EEPROMClass commit method's error log (#7598)

parent 1ad54069
......@@ -183,20 +183,21 @@ void EEPROMClass::write(int address, uint8_t value) {
bool EEPROMClass::commit() {
bool ret = false;
if (!_size) {
return false;
return false;
}
if (!_data) {
return false;
return false;
}
if (!_dirty) {
return true;
return true;
}
if (ESP_OK != nvs_set_blob(_handle, _name, _data, _size)) {
log_e( "error in write");
esp_err_t err = nvs_set_blob(_handle, _name, _data, _size);
if (err != ESP_OK) {
log_e("error in write: %s", esp_err_to_name(err));
} else {
_dirty = false;
ret = true;
_dirty = false;
ret = true;
}
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment