Skip to content

List user parameter presets in step 1 Presets menu - #661

Merged
michalpelka merged 1 commit into
mainfrom
mp/step1-user-presets
Nov 26, 2026
Merged

michalpelka merged 1 commit into
mainfrom
mp/step1-user-presets

Conversation

@michalpelka

@michalpelka michalpelka commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The Presets menu of lidar_odometry_step_1 now lists the user's own parameter files (*.toml) under the built-in presets, sorted by name. Clicking one loads it the same way as Parameters > Load parameters: only the keys in the file change, so a preset can be partial.
  • Folder: %APPDATA%\hdmapping on Windows; $XDG_CONFIG_HOME/hdmapping, falling back to ~/.config/hdmapping, on Linux and macOS. The folder is re-read each time the menu opens, so new files appear without restarting. The app doesn't create the folder. When it has no presets, the menu shows a greyed-out "No user presets" item whose tooltip gives the folder path.
  • Windows paths with non-ASCII user names (e.g. C:\Users\Michał\...) work: APPDATA is read as a wide string and passed to toml++ as UTF-8, which toml++ widens again before opening the file on MSVC.

Test plan

  • lidar_odometry_step_1 builds on Linux; clang-format 21 is clean
  • Windows build (CI) and a manual check on Windows: put a .toml in %APPDATA%\hdmapping, open Presets, load it
  • Linux/macOS: put a .toml saved with Save parameters in ~/.config/hdmapping, load it from Presets, check that the parameters changed and the checkmark moves to it
  • With the folder missing or empty, "No user presets" is shown and its tooltip gives the folder path
  • LIO golden trajectory check passes (processing code is untouched)

The Presets menu now lists the .toml parameter files in the user's config
folder: %APPDATA%\hdmapping on Windows, $XDG_CONFIG_HOME/hdmapping or
~/.config/hdmapping elsewhere. The folder is re-read each time the menu
opens. Clicking a preset loads it like Parameters > Load parameters.

Parameters > Save parameters opens its dialog in that folder and creates it
if needed. The other file dialogs keep their last location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michalpelka
michalpelka force-pushed the mp/step1-user-presets branch from 436c64f to eb37692 Compare November 25, 2026 16:08
@michalpelka

Copy link
Copy Markdown
Contributor Author

Tested on Wine, I do not have mental capability to run Windows this month.

@michalpelka
michalpelka merged commit 5abeed3 into main Nov 26, 2026
7 checks passed
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