Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc3f8312 authored by Yu Shan's avatar Yu Shan
Browse files

Update doc for VEHICLE_SPEED_DISPLAY_UNITS.

Part of a large doc update. Add doc for new supported value range
APIs. For be backward compatible with older VHAL clients still
using deprecated fields, we still require the old fields to be
populated.

Test: None
Bug: 371636116
Flag: EXEMPT no code change
Change-Id: Ib965ef400b00c1ccc719862c2dcd6bae16da0cc2
parent b4a1c64a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -476,7 +476,11 @@
            {
                "name": "Speed units for display",
                "value": 289408517,
                "description": "Speed units for display\nIndicates type of units the car is using to display speed to user. Eg. m\/s, km\/h, or mph.\nVehiclePropConfig.configArray is used to indicate the supported speed display units. Pressure units are defined in VehicleUnit. For example: configArray[0] = METER_PER_SEC configArray[1] = MILES_PER_HOUR configArray[2] = KILOMETERS_PER_HOUR\nIf updating VEHICLE_SPEED_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties, then their values must be updated and communicated to the AAOS framework as well.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
                "data_enums": [
                    "VehicleUnit"
                ],
                "data_enum": "VehicleUnit",
                "description": "Speed units for display\nIndicates type of units the car is using to display speed to user. Eg. m\/s, km\/h, or mph.\n{@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID (0) must be {@code true}.\n{@code getSupportedValuesLists} for [VEHICLE_SPEED_DISPLAY_UNITS, areaId=0] must return a {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}, e.g. [METER_PER_SEC, MILES_PER_HOUR, KILOMETERS_PER_HOUR].\nFor backward compatibility, config array for this property must contain the same values as supported values at boot time. For example: configArray[0] = METER_PER_SEC configArray[1] = MILES_PER_HOUR configArray[2] = KILOMETERS_PER_HOUR\nIf updating VEHICLE_SPEED_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties, then their values must be updated and communicated to the AAOS framework as well.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
            },
            {
                "name": "EXTERNAL_CAR_TIME",
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ public final class EnumForVehicleProperty {
        Map.entry(VehicleProperty.FUEL_VOLUME_DISPLAY_UNITS, List.of(VehicleUnit.class)),
        Map.entry(VehicleProperty.TIRE_PRESSURE_DISPLAY_UNITS, List.of(VehicleUnit.class)),
        Map.entry(VehicleProperty.EV_BATTERY_DISPLAY_UNITS, List.of(VehicleUnit.class)),
        Map.entry(VehicleProperty.VEHICLE_SPEED_DISPLAY_UNITS, List.of(VehicleUnit.class)),
        Map.entry(VehicleProperty.HW_ROTARY_INPUT, List.of(RotaryInputType.class)),
        Map.entry(VehicleProperty.HW_CUSTOM_INPUT, List.of(CustomInputType.class)),
        Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_STATE, List.of(VehicleLightState.class)),
+12 −2
Original line number Diff line number Diff line
@@ -1603,8 +1603,15 @@ enum VehicleProperty {
     *
     * Indicates type of units the car is using to display speed to user. Eg. m/s, km/h, or mph.
     *
     * VehiclePropConfig.configArray is used to indicate the supported speed display units.
     * Pressure units are defined in VehicleUnit.
     * {@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID
     * (0) must be {@code true}.
     *
     * {@code getSupportedValuesLists} for [VEHICLE_SPEED_DISPLAY_UNITS, areaId=0] must return a
     * {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList},
     * e.g. [METER_PER_SEC, MILES_PER_HOUR, KILOMETERS_PER_HOUR].
     *
     * For backward compatibility, config array for this property must contain the same values as
     * supported values at boot time.
     * For example: configArray[0] = METER_PER_SEC
     *              configArray[1] = MILES_PER_HOUR
     *              configArray[2] = KILOMETERS_PER_HOUR
@@ -1618,6 +1625,9 @@ enum VehicleProperty {
     * @change_mode VehiclePropertyChangeMode.ON_CHANGE
     * @access VehiclePropertyAccess.READ_WRITE
     * @access VehiclePropertyAccess.READ
     * @data_enum VehicleUnit
     * @require_supported_values_list
     * @legacy_supported_values_in_config
     * @version 2
     */
    VEHICLE_SPEED_DISPLAY_UNITS = 0x0605 + 0x10000000 + 0x01000000