Expand description
Descriptions, units, grouping, and valid ranges for params, for ground stations
(param-metadata feature): a host-side companion to each ParamTable, so flight-controller
firmware, which never enables the feature, carries none of it.
A config that implements ParamMetadata describes each of its params in a
METADATA table with the same names in the same order as its
PARAMS. Ranges restate what the config’s validate accepts, in the
param’s unit; the core’s tests check each against validate, so a range can’t drift from
validation unnoticed.
§Examples
use stable_flight::params::metadata::ParamMetadata;
use stable_flight::stabilizers::copter::CopterStabilizerConfig;
let angle_imax = CopterStabilizerConfig::METADATA
.iter()
.find(|m| m.name() == "STAB_ATT_IMAX")
.expect("described");
assert_eq!(angle_imax.units(), "rad*s");
assert_eq!(angle_imax.min().map(|b| b.value()), Some(0.0));
assert_eq!(angle_imax.max(), None);Structs§
- Bound
- One end of a param’s valid range, in the param’s unit.
- Param
Meta - What a ground station shows for one param: its description, unit, where it is grouped, and its valid range. Built from a per-group template:
Traits§
- Param
Metadata - A
ParamTablewhose params are described for ground stations.