Project

General

Profile

Map Output » History » Version 2

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
26
| Setting | Meaning | Unit | Range / values | Notes |
27
|---|---|---|---|---|
28
| **Target output** | The output this drives | — | an existing output | Chosen by alias; receives the remapped value. |
29
| **Default value** | Value used before a source value is available | target unit | sint32 | Sent to the target until a source value arrives. |
30
| **Input values (X)** | Breakpoints on the input axis | source unit | repeated sint32 | Must be **strictly increasing**. |
31
| **Output values (Y)** | Value at each breakpoint | target unit | repeated sint32 | One per input breakpoint; the controller interpolates between points. |
32
33
The lookup is a **1D map**: the source value is found on the X axis and the
34
corresponding Y value is produced, interpolating between breakpoints. See
35
[Scaling & Maps](Scaling_and_Maps).
36
37
## Common settings
38
Map Output also uses the shared settings — alias and pin. See [Common IO Settings](Common_IO_Settings).
39
40
## Example — linearise a proportional valve
41
1. Create the valve's [PWM Output](PWM_Output) first (alias `Valve Drive`).
42
2. Add a **Map Output**, alias `Valve Linearise`, **target output** `Valve Drive`.
43
3. **Input values (X)** = requested flow `0, 25, 50, 75, 100`.
44
4. **Output values (Y)** = the duty needed for that flow, e.g. `0, 15, 40, 70, 100`.
45
5. **Default value** `0`, then drive the Map Output from the flow request.
46
47
## Troubleshooting
48
- **Target doesn't move / wrong value:** check the **target output** alias and that
49
  the source is driving the Map Output, not the target directly.
50
- **Output jumps or is non-monotonic:** make sure **Input values (X)** are strictly
51
  increasing and that X and Y have the same number of points.
52
- **Unexpected value at start-up:** set a sensible **default value**.
53
54
## Related
55
- [Map Input](Map_Input) — the same 1D lookup applied to an input.
56
- [Splitter Output](Splitter_Output) — send one value to several outputs at once.
57
- [Scaling & Maps](Scaling_and_Maps)