MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / putInt64

Method putInt64

Tactility/Source/PreferencesEsp.cpp:117–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void Preferences::putInt64(const std::string& key, int64_t value) {
118 nvs_handle_t handle;
119 if (nvs_open(namespace_, NVS_READWRITE, &handle) == ESP_OK) {
120 if (nvs_set_i64(handle, key.c_str(), value) != ESP_OK) {
121 LOGGER.error("Failed to set {}:{}", namespace_, key);
122 } else if (nvs_commit(handle) != ESP_OK) {
123 LOGGER.error("Failed to commit {}:{}", namespace_, key);
124 }
125 nvs_close(handle);
126 } else {
127 LOGGER.error("Failed to open namespace {}", namespace_);
128 }
129}
130
131void Preferences::putString(const std::string& key, const std::string& text) {
132 nvs_handle_t handle;

Callers 1

storeTimeInNvsFunction · 0.45

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected