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

Function save

Tactility/Source/settings/DisplaySettings.cpp:181–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181bool save(const DisplaySettings& settings) {
182 std::map<std::string, std::string> map;
183 map[SETTINGS_KEY_BACKLIGHT_DUTY] = std::to_string(settings.backlightDuty);
184 map[SETTINGS_KEY_GAMMA_CURVE] = std::to_string(settings.gammaCurve);
185 map[SETTINGS_KEY_ORIENTATION] = toString(settings.orientation);
186 map[SETTINGS_KEY_TIMEOUT_ENABLED] = settings.backlightTimeoutEnabled ? "1" : "0";
187 map[SETTINGS_KEY_TIMEOUT_MS] = std::to_string(settings.backlightTimeoutMs);
188 map[SETTINGS_KEY_SCREENSAVER_TYPE] = toString(settings.screensaverType);
189 return file::savePropertiesFile(SETTINGS_FILE, map);
190}
191
192lv_display_rotation_t toLvglDisplayRotation(Orientation orientation) {
193 auto* lvgl_display = lv_display_get_default();

Callers 9

finishCalibrationMethod · 0.50
onHideMethod · 0.50
onHideMethod · 0.50
onShowMethod · 0.50
onHideMethod · 0.50
onHideMethod · 0.50
onToggleAutoConnectMethod · 0.50
onToggleAutoConnectMethod · 0.50
onHideMethod · 0.50

Calls 2

savePropertiesFileFunction · 0.85
toStringFunction · 0.70

Tested by

no test coverage detected