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

Method optInt64

Tactility/Source/PreferencesEsp.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41bool Preferences::optInt64(const std::string& key, int64_t& out) const {
42 nvs_handle_t handle;
43 if (nvs_open(namespace_, NVS_READWRITE, &handle) != ESP_OK) {
44 LOGGER.error("Failed to open namespace {}", namespace_);
45 return false;
46 } else {
47 bool success = nvs_get_i64(handle, key.c_str(), &out) == ESP_OK;
48 nvs_close(handle);
49 return success;
50 }
51}
52
53bool Preferences::optString(const std::string& key, std::string& out) const {
54 nvs_handle_t handle;

Callers 1

setTimeFromNvsFunction · 0.45

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected