# Gauges

Display vehicle telemetry such as speed, battery, or mode in portal/widget-based operator controls.

Last validated: 2026-05-05

Use gauges when the operator needs live vehicle state in the control page. Examples include speed, battery, hydraulic pressure, drive mode, autonomy state, or warnings from the vehicle controller.

## Preferred portal/widget flow

In the portal-based operator experience, gauges should be configured as widgets on the operator page. The vehicle integration sends telemetry through OCP, and the operator page binds widget values to fields in that telemetry payload.

Typical flow:

1.  Decide which vehicle telemetry field should be visible.
    
2.  Add the value to `vehicle_user_data.user_data` in the vehicle-side OCP response.
    
3.  In the portal, add a gauge or indicator widget.
    
4.  Bind the widget to the telemetry field.
    
5.  Test with the real vehicle or a simulator.
    

For example, the vehicle-side response can include:

```json
{
  "ack_time": 123456,
  "ack_time_mac": 987654321,
  "vehicle_user_data": {
    "user_data": {
      "speed_mps": 1.4,
      "battery": 0.82,
      "drive_mode": "manual"
    }
  }
}
```

## Webview fallback

If you are building a custom webview instead of using portal widgets, listen for `ocp_vehicle_user_data` and render the values in your page.

See [Operator-Side Control](operator-side-control.md) and [Webview and JavaScript SDK](webview-sdk.md).

## Design notes

Show operator-critical values with clear units and stale-data behavior. OCP repeats the latest vehicle data, so dashboards should use `ms_since_last_vehicle_data` when they need to warn about stale telemetry.
