Skip to content

overload Preferences.getBytes similar to nvs so you can get size of t…#2498

Merged
me-no-dev merged 2 commits into
espressif:masterfrom
lbernstone:prefs1
Apr 10, 2019
Merged

overload Preferences.getBytes similar to nvs so you can get size of t…#2498
me-no-dev merged 2 commits into
espressif:masterfrom
lbernstone:prefs1

Conversation

@lbernstone

Copy link
Copy Markdown
Contributor

overload Preferences.getBytes similar to nvs so you can get size of the array.

Comment thread libraries/Preferences/examples/Prefs2Struct/Prefs2Struct.ino
@stickbreaker

Copy link
Copy Markdown
Contributor

@lbernstone Sorry, New version. I last worked on NVS over a year ago, Looks like they implement a spanning blob sometime within the last year.

from: NVS documentation Entry and Entry state Bitmap

For values of primitive types (currently integers from 1 to 8 bytes long), entry holds one key-value pair. For string and blob types, entry holds part of the whole key-value pair. For strings, in case when a key-value pair spans multiple entries, all entries are stored in the same page. Blobs are allowed to span over multiple pages by dividing them into smaller chunks. For the purpose tracking these chunks, an additional fixed length metadata entry is stored called “blob index” entry. Earlier format of blobs are still supported (can be read and modified). However, once the blobs are modified, they are stored using the new format.

I just "knew" this value was out of range, Sorry.

Chuck.

@me-no-dev me-no-dev merged commit da8b7c1 into espressif:master Apr 10, 2019
@me-no-dev

Copy link
Copy Markdown
Member

done :) sorry for taking so long @lbernstone

@lbernstone lbernstone deleted the prefs1 branch April 16, 2019 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants