summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai <kwangsudo@google.com>2019-06-20 16:40:22 -0700
committerKai Wang <kwangsudo@google.com>2019-06-22 01:52:02 +0000
commit42a26244ad0d1c72b023c5fed4d63aea179906b5 (patch)
tree1b2573059c496f8074f750ccb2ca25694f9e3a43
parente4be4c97653bc3a255e1fcc27913545edd76e71b (diff)
downloadandroid_hardware_interfaces-42a26244ad0d1c72b023c5fed4d63aea179906b5.tar.gz
android_hardware_interfaces-42a26244ad0d1c72b023c5fed4d63aea179906b5.tar.bz2
android_hardware_interfaces-42a26244ad0d1c72b023c5fed4d63aea179906b5.zip
Add Speed_Display_Units property in DefaultHal
Update properties for DefaultHal and it is also be a code sample for adding new properties. Bug: 134988550 Test: flash it and verify property by kitchenSink Change-Id: Iedf3ea5b288acfe95b3c676d90660435b34ed367
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index 39fe99133..a46de24b1 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -242,6 +242,17 @@ const ConfigDeclaration kVehicleProperties[]{
{.config =
{
+ .prop = toInt(VehicleProperty::VEHICLE_SPEED_DISPLAY_UNITS),
+ .access = VehiclePropertyAccess::READ_WRITE,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {(int)VehicleUnit::METER_PER_SEC,
+ (int)VehicleUnit::MILES_PER_HOUR,
+ (int)VehicleUnit::KILOMETERS_PER_HOUR},
+ },
+ .initialValue = {.int32Values = {(int)VehicleUnit::KILOMETERS_PER_HOUR}}},
+
+ {.config =
+ {
.prop = toInt(VehicleProperty::INFO_DRIVER_SEAT),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::STATIC,