Skip to content

feat: Add IMU Test TUI - #817

Draft
pastaq wants to merge 4 commits into
mainfrom
pastaq/test_imu_tui
Draft

pastaq wants to merge 4 commits into
mainfrom
pastaq/test_imu_tui

Conversation

@pastaq

@pastaq pastaq commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Adds an IMU Test TUI

Attaching the built-in debug target means saving and restoring the
device's target list, profile, intercept mode and event filters. The
inertial validation tool needs the same bookkeeping as the device test
tool, so extract it into a helper that both menus call.

While at it:

- Separate attach and restore into named functions taking the connection
  and the composite device path.
- Keep what a restore needs in one SavedState.
- Report an unsupported target type as an error rather than a string.
- Simplify the profile handling, the wait loop and the target list.
- Log why the signal handler stops instead of discarding the error.
- Use doc comments in place of step comments.

Assisted-by: LLM
The performance and test commands each build a terminal UI, spawn the blocking
run and unwrap the error by hand. Take that shape once so a new menu command
does not repeat it.

Assisted-by: LLM
A guided run through four resting poses and three quarter turns measures every inertial sensor a device advertises at the same moment, so a combined sensor and the sensors it is averaged from can be compared directly. Steps are judged on fixed time windows and rotations on the angle the gyro integrates, which makes the result independent of how fast a device reports and exposes a wrong scale that a mean angular rate hides.

The tool states the mount matrix change each sensor calls for and where to make it. It writes nothing: a derived transform is printed with the file and key it belongs to, because the values it corrects come from the running daemon's configuration.

Assisted-by: LLM
Explain the measurement rules a reader needs to interpret a run: sources that filter unchanged events go silent while a device is held still, so the counts shown are deltas rather than a report rate, and rotation steps pass on the integrated angle rather than on a mean.

Assisted-by: LLM
@pastaq
pastaq force-pushed the pastaq/test_imu_tui branch from 475386d to c88ff81 Compare November 20, 2026 12:25

This branch has not been deployed

No deployments
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