Vehicle HAL: add wheeltick property

Bug: b/31926188

Test: mm -j
Change-Id: I290c7363fc93c838aa75cfc913368f907a566d47
This commit is contained in:
Pavel Maltsev 2017-01-18 16:04:11 -08:00
parent 269292f2ba
commit f0e53e454d
2 changed files with 69 additions and 0 deletions

View file

@ -1080,6 +1080,25 @@ $(GEN): $(LOCAL_PATH)/types.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
#
# Build types.hal (Wheel)
#
GEN := $(intermediates)/android/hardware/vehicle/V2_0/Wheel.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-Ljava \
-randroid.hardware:hardware/interfaces \
-randroid.hidl:system/libhidl/transport \
android.hardware.vehicle@2.0::types.Wheel
$(GEN): $(LOCAL_PATH)/types.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
#
# Build IVehicle.hal
#
@ -2204,6 +2223,25 @@ $(GEN): $(LOCAL_PATH)/types.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
#
# Build types.hal (Wheel)
#
GEN := $(intermediates)/android/hardware/vehicle/V2_0/Wheel.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-Ljava \
-randroid.hardware:hardware/interfaces \
-randroid.hidl:system/libhidl/transport \
android.hardware.vehicle@2.0::types.Wheel
$(GEN): $(LOCAL_PATH)/types.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
#
# Build IVehicle.hal
#

View file

@ -225,6 +225,28 @@ enum VehicleProperty: int32_t {
| VehiclePropertyType:FLOAT
| VehicleArea:GLOBAL),
/*
* Reports wheel rotational distance in meters since last wheel tick
* event
*
* The value is a vector each element represents distance for individual
* wheel in the following order: left front, right front, left rear,
* right rear. VehiclePropValue.timestamp must be correctly filled in.
*
* Vendors must specify wheels that support this sensor in
* VehiclePropConfig.configFlags. The format of this field is a bitset of
* values from Wheel enum.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
* @access VehiclePropertyAccess:READ
* @unit VehicleUnit:METER
*/
WHEEL_TICK = (
0x0306
| VehiclePropertyGroup:SYSTEM
| VehiclePropertyType:FLOAT_VEC
| VehicleArea:GLOBAL),
/*
* Currently selected gear
*
@ -2744,6 +2766,15 @@ enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
};
enum Wheel : int32_t {
UNKNOWN = 0x0,
LEFT_FRONT = 0x1,
RIGHT_FRONT = 0x2,
LEFT_REAR = 0x4,
RIGHT_REAR = 0x8,
};
enum SecondaryAirStatus : int32_t {
UPSTREAM = 1,