fix: Improve startup time with proper settings loading.

* Avoid doing duplicate calls to setings_load_subtree, which iterates
  NVS fully each time under the hood, and instead use on settings_load
  later in the lifecycle.
This commit is contained in:
Peter Johanson
2024-07-03 02:33:26 -06:00
committed by Pete Johanson
parent f18974e8c4
commit 80173f8ea3
11 changed files with 129 additions and 102 deletions

View File

@@ -24,6 +24,11 @@ int main(void) {
return -ENOTSUP;
}
#if IS_ENABLED(CONFIG_SETTINGS)
settings_subsys_init();
settings_load();
#endif
#ifdef CONFIG_ZMK_DISPLAY
zmk_display_init();
#endif /* CONFIG_ZMK_DISPLAY */