torque-pro-assistant - v1.0.0
    Preparing search index...
    • Pick the (key, unit) pair to use for a PID under the active units preference. When units === 'metric' and the catalog entry carries an altUnit.metric companion, returns the metric key + unit; in every other case returns the catalog entry's native key + unit, or the raw input + an empty unit when the PID isn't in the catalog.

      Charts and tables that want runtime unit swapping read their series key + unit through this helper instead of hardcoding 'speed_mph' / 'mph' constants.

      Parameters

      • pidKey: string

        Catalog key for the PID (e.g. 'speed_mph').

      • units: UnitsPreference

        Active units preference.

      Returns ResolvedPid

      The resolved key + unit pair.