Merge changes from topics "seat_footwell_lights_state", "seat_footwell_lights_switch"

* changes:
  Added SEAT_FOOTWELL_LIGHTS_SWITCH to hardware layer
  Added SEAT_FOOTWELL_LIGHTS_STATE to hardware layer
This commit is contained in:
Shrikar Amirisetty 2023-01-04 18:40:09 +00:00 committed by Android (Google) Code Review
commit 7bbe0c90e2
9 changed files with 130 additions and 0 deletions

View file

@ -161,6 +161,8 @@ enum VehicleProperty {
SEAT_HEADREST_ANGLE_MOVE = 356518808,
SEAT_HEADREST_FORE_AFT_POS = 356518809,
SEAT_HEADREST_FORE_AFT_MOVE = 356518810,
SEAT_FOOTWELL_LIGHTS_STATE = 356518811,
SEAT_FOOTWELL_LIGHTS_SWITCH = 356518812,
SEAT_EASY_ACCESS_ENABLED = 354421661,
SEAT_AIRBAG_ENABLED = 354421662,
SEAT_CUSHION_SIDE_SUPPORT_POS = 356518815,

View file

@ -1846,6 +1846,48 @@ enum VehicleProperty {
*/
SEAT_HEADREST_FORE_AFT_MOVE = 0x0B9A + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
/**
* Represents property for the seat footwell lights state.
*
* SEAT_FOOTWELL_LIGHTS_STATE reflects the current state of the lights at any point in time.
* This is different from the function of SEAT_FOOTWELL_LIGHTS_SWITCH which represents the
* position of the switch controlling the lights. Therefore, SEAT_FOOTWELL_LIGHTS_STATE may not
* match the value of SEAT_FOOTWELL_LIGHTS_SWITCH (e.g. SEAT_FOOTWELL_LIGHTS_SWITCH=AUTOMATIC
* and SEAT_FOOTWELL_LIGHTS_STATE=ON).
*
* This property should only be implemented if SEAT_FOOTWELL_LIGHTS_STATE's value may be
* different from that of CABIN_LIGHTS_STATE.
*
* For each supported area ID, the VehicleAreaConfig#supportedEnumValues must be defined unless
* all enum values of VehicleLightState are supported.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ
* @data_enum VehicleLightState
*/
SEAT_FOOTWELL_LIGHTS_STATE =
0x0B9B + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
/**
* Represents property for the seat footwell lights switch.
*
* SEAT_FOOTWELL_LIGHTS_SWITCH represents the position of the switch controlling the lights.
* This is different from the function of SEAT_FOOTWELL_LIGHTS_STATE which reflects the current
* state of the lights at any point in time. Therefore, SEAT_FOOTWELL_LIGHTS_SWITCH may not
* match the value of SEAT_FOOTWELL_LIGHTS_STATE (e.g. SEAT_FOOTWELL_LIGHTS_SWITCH=AUTOMATIC and
* SEAT_FOOTWELL_LIGHTS_STATE=ON).
*
* This property should only be implemented if SEAT_FOOTWELL_LIGHTS_SWITCH's value may be
* different from that of CABIN_LIGHTS_SWITCH.
*
* For each supported area ID, the VehicleAreaConfig#supportedEnumValues must be defined unless
* all enum values of VehicleLightSwitch are supported.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
*/
SEAT_FOOTWELL_LIGHTS_SWITCH =
0x0B9C + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
/**
* Represents property for Seat easy access feature.
*

View file

@ -161,6 +161,8 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
{VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_HEADREST_FORE_AFT_POS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_HEADREST_FORE_AFT_MOVE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_FOOTWELL_LIGHTS_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::SEAT_FOOTWELL_LIGHTS_SWITCH, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_EASY_ACCESS_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_AIRBAG_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyAccess::READ_WRITE},

View file

@ -161,6 +161,8 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
{VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_HEADREST_FORE_AFT_POS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_HEADREST_FORE_AFT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_FOOTWELL_LIGHTS_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_FOOTWELL_LIGHTS_SWITCH, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_EASY_ACCESS_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_AIRBAG_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyChangeMode::ON_CHANGE},

View file

@ -153,6 +153,8 @@ public final class AccessForVehicleProperty {
Map.entry(VehicleProperty.SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_FORE_AFT_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_FORE_AFT_MOVE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_STATE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_SWITCH, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_EASY_ACCESS_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_AIRBAG_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyAccess.READ_WRITE),

View file

@ -153,6 +153,8 @@ public final class ChangeModeForVehicleProperty {
Map.entry(VehicleProperty.SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_FORE_AFT_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_FORE_AFT_MOVE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_SWITCH, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_EASY_ACCESS_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_AIRBAG_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyChangeMode.ON_CHANGE),

View file

@ -89,6 +89,7 @@ const std::unordered_map<std::string, int> CONSTANTS_BY_NAME = {
{"SEAT_2_LEFT", SEAT_2_LEFT},
{"SEAT_2_RIGHT", SEAT_2_RIGHT},
{"SEAT_2_CENTER", SEAT_2_CENTER},
{"SEAT_2_LEFT_2_RIGHT_2_CENTER", SEAT_2_LEFT | SEAT_2_RIGHT | SEAT_2_CENTER},
{"WHEEL_REAR_RIGHT", WHEEL_REAR_RIGHT},
{"WHEEL_REAR_LEFT", WHEEL_REAR_LEFT},
{"WHEEL_FRONT_RIGHT", WHEEL_FRONT_RIGHT},

View file

@ -1070,6 +1070,71 @@
}
]
},
{
"property": "VehicleProperty::SEAT_FOOTWELL_LIGHTS_STATE",
"defaultValue": {
"int32Values": [
"Constants::LIGHT_STATE_OFF"
]
},
"areas": [
{
"areaId": "Constants::SEAT_1_LEFT",
"supportedEnumValues": [
"Constants::LIGHT_STATE_OFF",
"Constants::LIGHT_STATE_ON"
]
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"supportedEnumValues": [
"Constants::LIGHT_STATE_OFF",
"Constants::LIGHT_STATE_ON"
]
},
{
"areaId": "Constants::SEAT_2_LEFT_2_RIGHT_2_CENTER",
"supportedEnumValues": [
"Constants::LIGHT_STATE_OFF",
"Constants::LIGHT_STATE_ON"
]
}
]
},
{
"property": "VehicleProperty::SEAT_FOOTWELL_LIGHTS_SWITCH",
"defaultValue": {
"int32Values": [
"Constants::LIGHT_SWITCH_OFF"
]
},
"areas": [
{
"areaId": "Constants::SEAT_1_LEFT",
"supportedEnumValues": [
"Constants::LIGHT_SWITCH_OFF",
"Constants::LIGHT_SWITCH_ON",
"Constants::LIGHT_SWITCH_AUTO"
]
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"supportedEnumValues": [
"Constants::LIGHT_SWITCH_OFF",
"Constants::LIGHT_SWITCH_ON",
"Constants::LIGHT_SWITCH_AUTO"
]
},
{
"areaId": "Constants::SEAT_2_LEFT_2_RIGHT_2_CENTER",
"supportedEnumValues": [
"Constants::LIGHT_SWITCH_OFF",
"Constants::LIGHT_SWITCH_ON",
"Constants::LIGHT_SWITCH_AUTO"
]
}
]
},
{
"property": "VehicleProperty::SEAT_EASY_ACCESS_ENABLED",
"defaultValue": {

View file

@ -583,6 +583,18 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatWalkInPosConfig) {
VehicleArea::SEAT, VehiclePropertyType::INT32);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatFootwellLightsStateConfig) {
verifyProperty(VehicleProperty::SEAT_FOOTWELL_LIGHTS_STATE, VehiclePropertyAccess::READ,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
VehicleArea::SEAT, VehiclePropertyType::INT32);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatFootwellLightsSwitchConfig) {
verifyProperty(VehicleProperty::SEAT_FOOTWELL_LIGHTS_SWITCH, VehiclePropertyAccess::READ_WRITE,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
VehicleArea::SEAT, VehiclePropertyType::INT32);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatEasyAccessEnabledConfig) {
verifyProperty(VehicleProperty::SEAT_EASY_ACCESS_ENABLED, VehiclePropertyAccess::READ_WRITE,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,