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

Method optInt32

Tactility/Source/PreferencesEsp.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29bool Preferences::optInt32(const std::string& key, int32_t& out) const {
30 nvs_handle_t handle;
31 if (nvs_open(namespace_, NVS_READWRITE, &handle) != ESP_OK) {
32 LOGGER.error("Failed to open namespace {}", namespace_);
33 return false;
34 } else {
35 bool success = nvs_get_i32(handle, key.c_str(), &out) == ESP_OK;
36 nvs_close(handle);
37 return success;
38 }
39}
40
41bool Preferences::optInt64(const std::string& key, int64_t& out) const {
42 nvs_handle_t handle;

Callers 5

getLastBusIndexMethod · 0.45
fromBundleFunction · 0.45
getModeFunction · 0.45
getResultIndexFunction · 0.45
getResultIndexFunction · 0.45

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected