feat(nvs): Add raw_data variable to NVS_Partition class in nvs_parser.py

This commit is contained in:
Adam Múdry
2024-10-01 15:04:13 +02:00
parent eec8a3ab83
commit 1eacc6c2a8

View File

@@ -64,8 +64,9 @@ class NVS_Partition:
f'Given partition data is not aligned to page size ({len(raw_data)} % {nvs_const.page_size} = {len(raw_data)%nvs_const.page_size})'
)
# Divide partition into pages
self.name = name
self.raw_data = raw_data
# Divide partition into pages
self.pages = []
for i in range(0, len(raw_data), nvs_const.page_size):
self.pages.append(NVS_Page(raw_data[i: i + nvs_const.page_size], i))