Project

General

Profile

Map Output » History » Version 1

Adam Klama, 06/21/2026 03:32 PM

1 1 Adam Klama
# Map Output
2
3
## Overview
4
A **Map Output** passes a value through a **1D lookup table** and sends the result
5
to another **target output**. Use it to reshape or **linearise** a command on its
6
way to an output — for example to compensate for a non-linear actuator without
7
changing the strategy that drives it.
8
9
It does not control a pin itself; it **remaps** a value and forwards it to the
10
target output you choose.
11
12
## Prerequisites & hardware
13
- The **target output** must already exist — create it first and note its alias.
14
- A source value (a map, driver or input) to feed into the lookup.
15
- No wiring of its own: the target output handles the physical pin.
16
17
## Add it in the app
18
1. Add a new output and choose **Map Output** as the type.
19
2. Give it a clear **alias** (e.g. `Actuator Linearise`).
20
3. Select the **target output** (by alias) that this should drive.
21
4. Enter the **lookup points** (X breakpoints and their Y values) and a
22
   **default value**, then drive the Map Output from your source.
23
24
## Settings reference
25
> Schema: `config/MapOutputConfigData.proto`.
26
27
| Setting | Meaning | Unit | Range / values | Notes |
28
|---|---|---|---|---|
29
| **Target output** | The output this drives | — | an existing output | Chosen by alias; receives the remapped value. |
30
| **Default value** | Value used before a source value is available | target unit | sint32 | Sent to the target until a source value arrives. |
31
| **Input values (X)** | Breakpoints on the input axis | source unit | repeated sint32 | Must be **strictly increasing**. |
32
| **Output values (Y)** | Value at each breakpoint | target unit | repeated sint32 | One per input breakpoint; the controller interpolates between points. |
33
34
The lookup is a **1D map**: the source value is found on the X axis and the
35
corresponding Y value is produced, interpolating between breakpoints. See
36
[Scaling & Maps](Scaling_and_Maps).
37
38
## Common settings
39
Map Output also uses the shared settings — alias and pin. See [Common IO Settings](Common_IO_Settings).
40
41
## Example — linearise a proportional valve
42
1. Create the valve's [PWM Output](PWM_Output) first (alias `Valve Drive`).
43
2. Add a **Map Output**, alias `Valve Linearise`, **target output** `Valve Drive`.
44
3. **Input values (X)** = requested flow `0, 25, 50, 75, 100`.
45
4. **Output values (Y)** = the duty needed for that flow, e.g. `0, 15, 40, 70, 100`.
46
5. **Default value** `0`, then drive the Map Output from the flow request.
47
48
## Troubleshooting
49
- **Target doesn't move / wrong value:** check the **target output** alias and that
50
  the source is driving the Map Output, not the target directly.
51
- **Output jumps or is non-monotonic:** make sure **Input values (X)** are strictly
52
  increasing and that X and Y have the same number of points.
53
- **Unexpected value at start-up:** set a sensible **default value**.
54
55
## Related
56
- [Map Input](Map_Input) — the same 1D lookup applied to an input.
57
- [Splitter Output](Splitter_Output) — send one value to several outputs at once.
58
- [Scaling & Maps](Scaling_and_Maps)