Project

General

Profile

Mux Input » History » Revision 2

Revision 1 (Adam Klama, 06/21/2026 02:33 PM) → Revision 2/3 (Adam Klama, 06/21/2026 03:16 PM)

# Mux Input 

 ## Overview 
 A **Mux Input** (multiplexer) passes through **one of up to eight data inputs**, 
 chosen by a separate **selector** input — like a rotary selector switch. The 
 selector's value (0–7) decides which data input appears at the output. Use it to 
 switch between sources at runtime: different calibration sets, sensor banks, or 
 operating-mode values. 

 ## Prerequisites & hardware 
 You need: 
 - A **selector input** whose value is `0`–`7` — any existing input, by alias. 
   This is often a [Constant Value Input](Constant_Value_Input), Input](Constant-Value-Input.md), an 
   [Analog Switch Input](Analog_Switch_Input) Input](Analog-Switch-Input.md) or a mode value. 
 - One or more **data inputs** to choose between (up to eight), each by alias. 

 ## Add it in the app 
 1. Add a new input and choose **Mux Input** as the type. 
 2. Choose the **selector** and **data inputs**. 
 3. Give it a clear **alias** (e.g. `Active Pressure Target`). 
 4. Assign the **selector input**, then fill **data input 0…7** with the sources 
    you want to switch between. 

 ## Settings reference 
 > Schema: `config/MuxInputConfigData.proto`. 

 | Setting | Meaning | Unit | Range / values | Notes | 
 |---|---|---|---|---| 
 | **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**. | 
 | **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. | 

 **How it selects:** the output simply mirrors the data input whose slot number 
 matches the current **selector** value. A selector of `2` passes **Data input 2** 
 straight through. 

 ## Common settings 
 Mux Input also uses the shared setting — alias. See [Common IO Settings](Common_IO_Settings). Settings](../Common-IO-Settings.md). 

 ## Example — switch pressure target by drive mode 
 1. Type **Mux Input**, alias `Active Pressure Target`. 
 2. **Selector input** = your `Drive Mode` value (0 = Comfort, 1 = Sport). 
 3. **Data input 0** = `Comfort Pressure` constant. 
 4. **Data input 1** = `Sport Pressure` constant. 
 5. The output now follows the constant for whichever mode is selected. 

 ## Troubleshooting 
 - **Output stuck on one source:** check the **selector** value actually changes 
   and lands on `0`–`7`. 
 - **Unexpected / zero output:** a selected slot may be empty — fill **Data input 
   N** for every selector value you use. 
 - **Selector out of range:** values above `7` have no matching slot; clamp or map 
   the selector so it stays within `0`–`7`. 

 ## Related 
 - [Constant Value Input](Constant_Value_Input) Input](Constant-Value-Input.md) — fixed values to switch between. 
 - [Analog Switch Input](Analog_Switch_Input) Input](Analog-Switch-Input.md) — a multi-position selector source. 
 - [Map Input](Map_Input) Input](Map-Input.md) — interpolate a value instead of selecting one.