Mapping key contract
Input mappings are stored and transferred as normalized keys:
bus|frameId|signalName|unit
bus: all, chassis, or haldex.
frameId: numeric frame identifier string.
signalName: normalized signal text (lowercase, underscore normalization).
unit: normalized unit text.
Binding resolution path
- Setup writes mappings through
POST /api/settings.
- Runtime refresh checks if source key changed for each input binding.
- Key is parsed into bus/frame/signal/unit tokens.
- Bus token resolves to enum (
ANY, CHASSIS, or HALDEX).
- Frame token resolves to integer frame id.
- Selected Haldex generation chooses the active DBC family before signal lookup.
- Signal lookup resolves DBC descriptor by frame id plus normalized name/unit.
- Binding becomes ready when descriptor exists and key is valid.
Generation-aware DBC selection
- Gen 1, 2, and 4 chassis decode uses the PQ signal catalog.
- Gen 5 chassis decode uses the MQB signal catalog.
- The stored mapping key format stays the same across generations; only the decoder source changes.
- Setup and CAN View can only surface decoded signals from frames that are currently present and recent.
Frame-to-value decode checks
A binding applies only when all checks pass:
- Binding is ready and has signal descriptor.
- Bus constraint matches current RX loop and bus index.
- Frame id matches (masked comparison for standard/extended width).
- Mux check passes for multiplexed signals.
- Decoded value is finite.
Mux behavior
If mapped signal is muxed, runtime fetches mux selector signal for the frame id, decodes selector, then
verifies selector equals mapped signal mux value before using the signal.
Freshness and fallback semantics
- Each mapped input has timestamp ticks updated on successful decode.
- Mapped value is considered fresh for 1000 ms.
- If stale or missing, legacy decode path can fill telemetry values.
- This prevents dead telemetry when mapping becomes temporarily unavailable.
Control implication
Dynamic mode calculations consume received_vehicle_speed, received_pedal_value, and
received_vehicle_rpm. Mapping quality directly affects control quality.
Validation strategy for integrators
- Assign one required input at a time in setup.
- Select the correct generation first so PQ or MQB decode resolution matches the vehicle.
- Observe live value response on setup rows and diagnostics telemetry.
- Verify monotonic behavior under expected vehicle action.
- Save mappings only after all required inputs are coherent.
- Road-test in conservative mode before aggressive tuning.
Try the OpenHaldex Firmware Demo
Preview the real OpenHaldex firmware UI in your browser with simulated live CAN traffic and interactive pages for tuning, diagnostics, logs, setup, and OTA workflows.
Open firmware demo