Skip to content

feat: add settings controller for launcher settings page#84

Merged
baba-dev merged 1 commit into
mainfrom
codex/add-settings-page-callbacks-and-helpers
Sep 19, 2025
Merged

feat: add settings controller for launcher settings page#84
baba-dev merged 1 commit into
mainfrom
codex/add-settings-page-callbacks-and-helpers

Conversation

@baba-dev
Copy link
Copy Markdown
Owner

Summary

  • wire the launcher settings page to a new integration SettingsController and register callbacks for user actions
  • implement a threaded SettingsController that drives HAL/ESP-IDF helpers for connection checks, themes, brightness, and tooling
  • add OTA, diagnostics, log export, and backup/restore handling with UI feedback and host fallbacks

Testing

  • idf.py build (fails: command not found)

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

@baba-dev baba-dev merged commit 827da48 into main Sep 19, 2025
1 of 7 checks passed
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 +255 to +264
void SettingsController::Impl::SetBrightness(uint8_t percent)
{
enqueue_task(
[this, percent]()
{
uint8_t clamped = std::clamp<uint8_t>(percent, kMinBrightness, kMaxBrightness);
config_.ui.brightness = clamped;
GetHAL()->setDisplayBrightness(clamped);
persist_config();
ui_page_settings_set_brightness(clamped);
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] Avoid persisting config on every brightness tick

The brightness handler saves the full configuration to persistent storage for every call to SetBrightness. The settings page’s slider invokes set_brightness on each LV_EVENT_VALUE_CHANGED step, so dragging from 5% to 100% will enqueue dozens of persist_config()app_cfg_save() writes in quick succession. app_cfg_save writes the struct through the registered backend (flash), so this will generate heavy flash wear and can stall the UI while the worker thread flushes each write. Consider applying the brightness change live but deferring the save until interaction ends or batching updates.

Useful? React with 👍 / 👎.

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