Metadata-Version: 2.4
Name: mavio-params
Version: 0.9.1
Summary: offline autopilot parameter metadata for mavio
Author: Jeff Mattson
Author-email: Jeff Mattson <jam@jaggedmountain.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.8
Project-URL: Homepage, https://github.com/jaggedmountain/mavio
Project-URL: Repository, https://github.com/jaggedmountain/mavio
Project-URL: Issues, https://github.com/jaggedmountain/mavio/issues
Description-Content-Type: text/markdown

# mavio-params

Offline autopilot parameter metadata for
[mavio](https://github.com/jaggedmountain/mavio) — the generated ArduPilot param
descriptions, units, value labels and bitmasks that mavio hydrates param reads
against.

Split out of `mavio` so the base install stays lean. Install it as the `params`
extra rather than directly:

```bash
uv add "mavio[params]"       # or: pip install "mavio[params]"
```

Without it, `mavio` still runs; param reads just come back with empty metadata.

## What's in it

Metadata is **per firmware, not global**. ArduPilot publishes one definition set
per vehicle and they genuinely disagree — `BATT_FS_LOW_ACT=1` is "Land" on Copter
and "RTL" on Rover — so a single shared dict would misdescribe most vehicles.

This package ships a shared `core` plus a per-vehicle delta for copter, plane,
rover, sub, tracker and blimp. A param goes in core only when more than one
firmware defines it *and they all agree exactly*, which dedupes ~29k raw entries
to ~7.5k. Each vehicle's module is imported lazily on first use.

mavio picks the set from the peer's HEARTBEAT; `param_definitions` pins it
explicitly. An unknown peer gets empty metadata rather than a guess.

```python
from mavio_params import definitions

defs = definitions('ardupilot.copter')
defs['BATT_FS_LOW_ACT']['values'][1]      # 'Land'
```

## Regenerating

Both steps are offline tools shipped with `mavio`, so the runtime never needs the
network:

```bash
mavgen fetch-definitions ./definitions       # every ArduPilot vehicle
mavgen generate-definitions ./definitions    # -> mavio_params/ardupilot/
```

See the [dialects guide](https://github.com/jaggedmountain/mavio/blob/main/docs/dialects.md)
for detail.

## License

MIT — see [LICENSE](https://github.com/jaggedmountain/mavio/blob/main/LICENSE).
