mag-usb Documentation¶
Welcome to the mag-usb documentation site. This project provides a USB-connected interface and tools for working with magnetometer sensors.
Use the navigation to the left or the links below to explore the documentation.
If you are building a fresh implementation, start with the Requirements page.
Contents¶
Contents
- Getting Started
- Hardware Setup
- Configuration
- Data Format
- Orientation and Axes
- mag-usb Requirements
- Troubleshooting
- Limitations
- Development Guide
- WebSocket Output Options Evaluation
- Code Review and Critique - 2026-05-15
- Second Claude Code Review for mag-usb.
- PR-1: drop the spurious /NOSRegValue factor in POLL-mode scaling
- PR-2: actually program the chip’s CC and NOS registers (or remove the knobs)
- PR-3: fix the example tools/config.toml
- PR-4: accept config-file path on the CLI
- PR-5: make -P (show settings) print chip state, not host state
- PR-6: render /etc/mag-recorder/mag-usb-driver.toml from mag-recorder-config.toml
- Suggested order for your conversation with Dave
Local preview¶
You can build and preview this site locally with MkDocs. First, create a virtual environment and install the docs dependencies:
python3 -m venv .venv
. .venv/bin/activate
pip install -r docs/requirements.txt
Then serve the site locally:
mkdocs serve
Open the URL printed by MkDocs (typically http://127.0.0.1:8000/) to preview.
Read the Docs¶
This repository is configured for Read the Docs using .readthedocs.yaml and docs/conf.py.
To publish the site on Read the Docs:
Push these files to your default branch.
Log in to https://readthedocs.org/ and import the project by pointing it at your repository.
In the RTD project settings, ensure the configuration file path is
.readthedocs.yaml.Trigger a build. RTD will install
docs/requirements.txtand build the Sphinx site.Once built, add the RTD URL to your repository README.
If your repository is hosted publicly (e.g., GitHub/GitLab), update repo_url in mkdocs.yml to enable “Edit this page” links.