Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding signal for vehicle engine oil level #271

Merged
merged 1 commit into from
May 11, 2021

Conversation

erikbosch
Copy link
Collaborator

This is a follow up to #180 to cover the need for a signal on oil level

Having oil level seems to be quite common in APIs, see examples below. Many use enums, some use percent plus boolean indicator. The proposed change here is reasonably aligned with the Volvo and Android representation.

In my view a "subjective" enum makes more sense than an "objective" percentage value, as percentage value might be difficult to interpret as it might be very vehicle dependent. Assume for example an engine with a nominal oil capacity (EngineOilCapacity) of 5 liters. Then oil level might be "critically low" already at 70% (if we consider 0% to mean a vehicle without any oil at all). Also, how sensitive a vehicle is for overfilling with oil might vary.

The intention with the proposed enum comments is to let "normal" indicate that oil is within expected range. I.e if you just have had an oil change and the garage has added EngineOilCapacity liters of oil, then the OilLevel shall be "normal", not "high". I.e. low and high shall indicate something that needs to be addressed, although not critically.

Volvo (https://developer.volvocars.com/volvo-api/extended-vehicle/#Oil_Level)

VERY_LOW
LOW
NORMAL
HIGH
VERY_HIGH

Android (https://android.googlesource.com/platform/hardware/interfaces/+/master/automotive/vehicle/2.0/types.hal)

enum VehicleOilLevel : int32_t {
    /**
     * Oil level values
     */
    CRITICALLY_LOW = 0,
    LOW = 1,
    NORMAL = 2,
    HIGH = 3,
    ERROR = 4,
};

Mercedes (https://developer.mercedes-benz.com/products/connect_your_fleet/details)

InternalCombustionEngine.Oil.Level | percent | Oil level | onInterval
-- | -- | -- | --
InternalCombustionEngine.Oil.Level.Warning |   | Indicates whether an oil level   warning is triggered true: ok false: oil level is overfilled or underfilled | onInterval and onChange

Other APIs (e.g. Android, Volvo) typically use an enum,
or a percentage value plus a boolean warning.

Rationale for using enum:

Limits are vehicle specific, it is impossible to make a generic
conclusion based on percentage.
@erikbosch
Copy link
Collaborator Author

Updated according to discussion April 27th:

  • "very" replaced with "critically"
  • "error" removed, error handling is outside the scope of VSS

@danielwilms
Copy link
Collaborator

2021/05/11

@danielwilms danielwilms merged commit d638100 into COVESA:master May 11, 2021
@erikbosch erikbosch deleted the oil_level branch January 10, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants