diff options
| author | jacqueline <me@jacqueline.id.au> | 2025-01-29 13:48:18 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2025-01-29 13:48:18 +1100 |
| commit | f9011839cd0b0b7f2b45e4231500cc267245912b (patch) | |
| tree | d0e1ffbed4e4e0df84214d1aab93c816972bbd3f /src/drivers/nvs.cpp | |
| parent | b4b43ca3eb011b0b69db39821ac310229e1b37ad (diff) | |
| download | tangara-fw-f9011839cd0b0b7f2b45e4231500cc267245912b.tar.gz | |
Actually read+write the fast charge nvs bit
It turns out that our error prone method of managing nvs keys has led to
an error!
We took a look over the other keys here and it didn't look like any
others were missing.
Fixes #204
Diffstat (limited to 'src/drivers/nvs.cpp')
| -rw-r--r-- | src/drivers/nvs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/nvs.cpp b/src/drivers/nvs.cpp index 6c916e60..6f0d874e 100644 --- a/src/drivers/nvs.cpp +++ b/src/drivers/nvs.cpp @@ -172,9 +172,7 @@ auto Setting<std::vector<bluetooth::MacAndName>>::store( } template <> -auto Setting<std::string>::store( - nvs_handle_t nvs, - std::string v) -> void { +auto Setting<std::string>::store(nvs_handle_t nvs, std::string v) -> void { cppbor::Tstr cbor{v}; auto encoded = cbor.encode(); nvs_set_blob(nvs, name_, encoded.data(), encoded.size()); @@ -295,6 +293,7 @@ auto NvsStorage::Read() -> void { display_rows_.read(handle_); haptic_motor_type_.read(handle_); lra_calibration_.read(handle_); + fast_charge_.read(handle_); brightness_.read(handle_); sensitivity_.read(handle_); amp_max_vol_.read(handle_); @@ -317,6 +316,7 @@ auto NvsStorage::Write() -> bool { display_rows_.write(handle_); haptic_motor_type_.write(handle_); lra_calibration_.write(handle_); + fast_charge_.write(handle_); brightness_.write(handle_); sensitivity_.write(handle_); amp_max_vol_.write(handle_); |
