Expand description
Adapters that reshape what a sensor reads and what an actuator is told.
A driver’s reading is whatever the part measures, often several channels at once,
and a driver’s command is whatever the part accepts. The pieces that consume a
sensor or drive an actuator usually want one plain value: a controller takes a
single f32, a profile drives a bool. Map and MapCommand bridge the two
without a wrapper type per part: Sensor::map selects or converts each reading
as it is taken, and Actuator::map_command converts each command before it
reaches the part.
Structs§
- Map
- A sensor whose readings pass through a function before they are returned.
- MapCommand
- An actuator whose commands are converted before they reach the part.