esp-cpp / espp

C++ components for ESP
https://esp-cpp.github.io/espp/
MIT License
30 stars 9 forks source link

feat(nvs): refactor espp::Nvs to use espp::NvsHandle #260

Closed finger563 closed 3 months ago

finger563 commented 3 months ago

Description

Motivation and Context

After #257 we had duplicated code for managing nvs stored data. That PR provided a nice espp::NvsHandle implementation, which could be used to replace and simplify the implementation of espp::Nvs.

This PR performs that refactor, and updates the espp::NvsHandle to have all the necessary overloads to do so.

How has this been tested?

Building and running the nvs/example on a QtPy ESP32S3 and rebooting it through enough cycles to erase the flash.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

When erasing the flash: CleanShot 2024-06-18 at 10 52 54

After erasing the flash: CleanShot 2024-06-18 at 10 53 01

Types of changes

Checklist:

Software

github-actions[bot] commented 3 months ago

:white_check_mark:Static analysis result - no issues found! :white_check_mark: