Skip to content

Add Presets section (name/frequency/voltage) to Settings page#1816

Open
xr1140 wants to merge 1 commit into
bitaxeorg:masterfrom
xr1140:feature/settings-presets
Open

Add Presets section (name/frequency/voltage) to Settings page#1816
xr1140 wants to merge 1 commit into
bitaxeorg:masterfrom
xr1140:feature/settings-presets

Conversation

@xr1140

@xr1140 xr1140 commented Jul 14, 2026

Copy link
Copy Markdown

Adds a Presets section to the AxeOS Settings page that lets users save named combinations of frequency and core voltage and apply them with one click. Fully client-side — no firmware/C changes.

Tuning a Bitaxe often means switching between a few known-good frequency/voltage combos (e.g. a quiet profile vs. a performance profile). Today that requires re-typing/selecting both values every time. Presets make switching a single click.

What's included

  • Save the current Frequency + Core Voltage under a name (max 5 presets).
  • Apply a preset — patches the form and sends PATCH /api/system with { frequency, coreVoltage }. Since both are non-restart fields, it takes effect without a reboot.
  • Edit / Delete existing presets (full CRUD).
  • Export / Import presets as a JSON file, so they can be backed up and moved between browsers/devices.

Design notes

  • Presets are stored in the browser via the existing LocalStorageService (key ASIC_PRESETS), mirroring how the Swarm feature already persists user data client-side. This keeps the feature entirely in AxeOS with zero device-side/NVS changes.
  • Implemented inside the existing EditComponent (the Settings form), reusing its reactive form and the existing SystemApiService.updateSystem() call. No new PrimeNG modules or dependencies were added.
  • Import validation rejects malformed JSON and silently caps at 5 entries.

Files changed

  • main/http_server/axe-os/src/app/components/edit/edit.component.ts
  • main/http_server/axe-os/src/app/components/edit/edit.component.html

Testing

  • npm run build compiles cleanly (AOT type-checks component + template).
  • Manually verified in the app: add/edit/delete presets, persistence across reloads, the 5-preset cap, Apply updating the Frequency/Core Voltage selects and hitting PATCH /api/system, and Export → clear → Import round-trip.
  • Built www.bin and flashed via Settings → Update on a real device.

Screenshots

Screenshot 2026-07-14 162621

Notes

  • Presets are browser-local (per the localStorage approach); Export/Import covers moving them between browsers.
  • No API, OpenAPI spec, or firmware changes — the existing PATCH /api/system endpoint is reused as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant