Skip to content

feat: add settings components and persistence tests#80

Merged
baba-dev merged 1 commit into
mainfrom
codex/create-new-component-directories-and-implementations
Sep 19, 2025
Merged

feat: add settings components and persistence tests#80
baba-dev merged 1 commit into
mainfrom
codex/create-new-component-directories-and-implementations

Conversation

@baba-dev
Copy link
Copy Markdown
Owner

Summary

  • add a shared settings_core schema with NVS-backed storage helpers and expose new service components for UI, networking, OTA, diagnostics, connection testing, and backup export
  • register the components in the build and surface an HTTP backup endpoint plus OTA/SNTP/diagnostics plumbing that relies on ESP-IDF services
  • extend the host unit test harness with app_cfg persistence coverage and backup JSON serialization verification

Testing

  • cmake --build tests/build --target unit_tests
  • ./tests/build/unit_tests
  • idf.py build (fails: command not found in container)

https://chatgpt.com/codex/tasks/task_e_68cd143030c48324842552720f2001e7

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +65 to +69
.callback = &dim_timer_callback,
.arg = state,
.name = "ui_dim",
};
esp_err_t err = esp_timer_create(&args, &s_dim_timer);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Update dim timer arg when scheduling new state

The dimming timer is created only once (if (!s_dim_timer)) and the callback argument is fixed to the first settings_ui_runtime_t passed in (.arg = state). Subsequent calls with a different state reuse the same timer without updating its argument, so when the timer fires it writes dimming_active to the stale struct and may dereference freed memory if the original state has gone out of scope. Consider deleting and recreating the timer or calling esp_timer_set_arg whenever a new state is scheduled.

Useful? React with 👍 / 👎.

@baba-dev baba-dev merged commit f11e51c into main Sep 19, 2025
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant