From 10651a6e68803e0591e59e64a4d83d65b17f9d81 Mon Sep 17 00:00:00 2001 From: Nishtha Ahuja Date: Fri, 25 Mar 2022 03:11:03 +0000 Subject: [PATCH] Add default config for new VHAL properties in Android T. Bug: 218388191 Test: manually tested in KitchenSink app Change-Id: I08b980a272e66d87de134dc37d6916209f4b4374 --- .../default_config/include/DefaultConfig.h | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h index 6ecac704f4..f31ead345c 100644 --- a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h +++ b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h @@ -287,6 +287,71 @@ const std::vector kVehicleProperties = { }, .initialValue = {.floatValues = {0.0f}}}, + {.config = + { + .prop = toInt(VehicleProperty::EV_CHARGE_CURRENT_DRAW_LIMIT), + .access = VehiclePropertyAccess::READ_WRITE, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.floatValues = {(float)VehicleUnit::AMPERE}}}, + + {.config = + { + .prop = toInt(VehicleProperty::EV_CHARGE_PERCENT_LIMIT), + .access = VehiclePropertyAccess::READ_WRITE, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + .configArray = {20, 40, 60, 80, 100}, + }, + .initialValue = {.floatValues = {40}}}, + + {.config = + { + .prop = toInt(VehicleProperty::EV_CHARGE_STATE), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {2}}}, + + {.config = + { + .prop = toInt(VehicleProperty::EV_CHARGE_SWITCH), + .access = VehiclePropertyAccess::READ_WRITE, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {0 /* false */}}}, + + {.config = + { + .prop = toInt(VehicleProperty::EV_CHARGE_TIME_REMAINING), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::CONTINUOUS, + }, + .initialValue = {.int32Values = {20}}}, + + {.config = + { + .prop = toInt(VehicleProperty::EV_REGENERATIVE_BRAKING_STATE), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {2}}}, + + {.config = + { + .prop = toInt(VehicleProperty::TRAILER_PRESENT), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {2}}}, + + {.config = + { + .prop = toInt(VehicleProperty::VEHICLE_CURB_WEIGHT), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::STATIC, + }, + .initialValue = {.int32Values = {30}}}, + {.config = { .prop = toInt(VehicleProperty::RANGE_REMAINING), @@ -818,6 +883,22 @@ const std::vector kVehicleProperties = { }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, + {.config = + { + .prop = toInt(VehicleProperty::FRONT_FOG_LIGHTS_STATE), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, + + {.config = + { + .prop = toInt(VehicleProperty::REAR_FOG_LIGHTS_STATE), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, + {.config = { .prop = toInt(VehicleProperty::HAZARD_LIGHTS_STATE), @@ -850,6 +931,22 @@ const std::vector kVehicleProperties = { }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, + {.config = + { + .prop = toInt(VehicleProperty::FRONT_FOG_LIGHTS_SWITCH), + .access = VehiclePropertyAccess::READ_WRITE, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, + + {.config = + { + .prop = toInt(VehicleProperty::REAR_FOG_LIGHTS_SWITCH), + .access = VehiclePropertyAccess::READ_WRITE, + .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + }, + .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, + {.config = { .prop = toInt(VehicleProperty::HAZARD_LIGHTS_SWITCH),