Project

General

Profile

Mux Input » History » Version 1

Adam Klama, 06/21/2026 02:33 PM

1 1 Adam Klama
# Mux Input
2
3
## Overview
4
A **Mux Input** (multiplexer) passes through **one of up to eight data inputs**,
5
chosen by a separate **selector** input — like a rotary selector switch. The
6
selector's value (0–7) decides which data input appears at the output. Use it to
7
switch between sources at runtime: different calibration sets, sensor banks, or
8
operating-mode values.
9
10
## Prerequisites & hardware
11
You need:
12
- A **selector input** whose value is `0`–`7` — any existing input, by alias.
13
  This is often a [Constant Value Input](Constant-Value-Input.md), an
14
  [Analog Switch Input](Analog-Switch-Input.md) or a mode value.
15
- One or more **data inputs** to choose between (up to eight), each by alias.
16
17
## Add it in the app
18
1. Add a new input and choose **Mux Input** as the type.
19
2. Choose the **selector** and **data inputs**.
20
3. Give it a clear **alias** (e.g. `Active Pressure Target`).
21
4. Assign the **selector input**, then fill **data input 0…7** with the sources
22
   you want to switch between.
23
24
## Settings reference
25
> Schema: `config/MuxInputConfigData.proto`.
26
27
| Setting | Meaning | Unit | Range / values | Notes |
28
|---|---|---|---|---|
29
| **Selector input** | Chooses which data input is passed through | — | an existing input (by alias), value `0`–`7` | Value `0` selects **Data input 0**, `1` selects **Data input 1**, … `7` selects **Data input 7**. |
30
| **Data inputs 0–7** | The eight candidate inputs to switch between | — | up to 8 existing inputs (by alias) | The output equals whichever one the selector points to. You need only fill the slots you use. |
31
32
**How it selects:** the output simply mirrors the data input whose slot number
33
matches the current **selector** value. A selector of `2` passes **Data input 2**
34
straight through.
35
36
## Common settings
37
Mux Input also uses the shared setting — alias. See [Common IO Settings](../Common-IO-Settings.md).
38
39
## Example — switch pressure target by drive mode
40
1. Type **Mux Input**, alias `Active Pressure Target`.
41
2. **Selector input** = your `Drive Mode` value (0 = Comfort, 1 = Sport).
42
3. **Data input 0** = `Comfort Pressure` constant.
43
4. **Data input 1** = `Sport Pressure` constant.
44
5. The output now follows the constant for whichever mode is selected.
45
46
## Troubleshooting
47
- **Output stuck on one source:** check the **selector** value actually changes
48
  and lands on `0`–`7`.
49
- **Unexpected / zero output:** a selected slot may be empty — fill **Data input
50
  N** for every selector value you use.
51
- **Selector out of range:** values above `7` have no matching slot; clamp or map
52
  the selector so it stays within `0`–`7`.
53
54
## Related
55
- [Constant Value Input](Constant-Value-Input.md) — fixed values to switch between.
56
- [Analog Switch Input](Analog-Switch-Input.md) — a multi-position selector source.
57
- [Map Input](Map-Input.md) — interpolate a value instead of selecting one.