View Source PorscheConnEx.Struct.Unit.Pressure (porsche_conn_ex v0.1.0)

Structure representing units of pressure.

Fields

  • unit (atom) — units used, depends on locale
    • :bar — bar
    • :psi — pounds per square inch
  • value (float) — value in above units
  • bar (float) — equivalent value in bar

Like most units in this API, a normalised value (bar) is included, regardless of locale settings.

Given the numbers returned by the API, it's pretty clear that the values are are stored in bar (with one decimal of precision), and are converted to PSI for imperial locales.

Summary

Types

@type t() :: %PorscheConnEx.Struct.Unit.Pressure{
  bar: float(),
  unit: unit(),
  value: float()
}
@type unit() :: :bar | :psi