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

Method putInt32

Tactility/Source/PreferencesEsp.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void Preferences::putInt32(const std::string& key, int32_t value) {
104 nvs_handle_t handle;
105 if (nvs_open(namespace_, NVS_READWRITE, &handle) == ESP_OK) {
106 if (nvs_set_i32(handle, key.c_str(), value) != ESP_OK) {
107 LOGGER.error("Failed to set {}:{}", namespace_, key);
108 } else if (nvs_commit(handle) != ESP_OK) {
109 LOGGER.error("Failed to commit {}:{}", namespace_, key);
110 }
111 nvs_close(handle);
112 } else {
113 LOGGER.error("Failed to open namespace {}", namespace_);
114 }
115}
116
117void Preferences::putInt64(const std::string& key, int64_t value) {
118 nvs_handle_t handle;

Callers 6

setLastBusIndexMethod · 0.45
toBundleFunction · 0.45
setModeFunction · 0.45
onListItemSelectedMethod · 0.45
onShowMethod · 0.45
onButtonClickedMethod · 0.45

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected