Mode output model
| Mode |
Source |
Output type |
Typical use |
| STOCK / OFF | No active request | Controller inactive path | Bypass/stock behavior |
| FWD | Preset | 0 lock target | Front-biased behavior |
| 5050, 6040, 7030, 8020, 9010 | Preset | Fixed lock target | Simple fixed split operation |
| SPEED | Speed curve | Interpolated lock | Speed-governed lock response |
| THROTTLE | Throttle curve | Interpolated lock | Pedal-driven lock response |
| RPM | RPM curve | Interpolated lock | Engine-speed-driven lock response |
| MAP | 2D table | Bilinear interpolated lock | Combined speed x throttle shaping |
Gate behavior
Preset modes
- Use threshold gate combining throttle minimum and high-speed disable checks.
- If thresholds fail, effective lock request is forced to zero.
Dynamic modes (SPEED / THROTTLE / RPM / MAP)
- Use mode-specific low-speed disengage threshold.
- Full-throttle launch override bypasses low-speed disengage when pedal is near full.
- Output is clamped into valid lock range before frame conversion.
Global interaction
Dynamic pages write global controls through POST /api/settings. Mode-specific lock shape data
(curve points/map table) is written via dedicated curve/map endpoints.
Interpolation mechanics
Curve modes
- Input axis points must be strictly ascending.
- Segment interpolation is linear between neighboring points.
- Below first point and above last point behavior uses endpoint clamping.
Map mode
- Locate neighboring throttle bin indices and throttle ratio.
- Locate neighboring speed bin indices and speed ratio.
- Interpolate speed within each of the two throttle rows.
- Interpolate between row results by throttle ratio.
Lock request conversion
Final lock request is converted to generation-specific byte-space by get_lock_target_adjusted_value()
before frame shaping in frames.cpp.
- Clamp request to valid range.
- Snap near-100 requests to full-scale path.
- Apply correction factor for partial requests.
- Apply invert/non-invert behavior depending on frame field semantics.
Debug capture safety override
When debug capture profile is active, settings logic forces stock/controller-off mode to prevent combined
heavy diagnostics and active drivetrain control.
Integration implication: UI should always re-read /api/status after writes instead of assuming the
requested mode remained active.
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