Added SEAT_CUSHION_SIDE_SUPPORT_POS to hardware layer.

Bug: 257268342
Test: atest VtsHalAutomotiveVehicle_TargetTest
Change-Id: I2f8a64399f634a930e55d16700009652063adee6
This commit is contained in:
shrikar 2022-11-09 18:27:06 +00:00 committed by Tyler Trephan
parent 3326de0352
commit 802ecb524c
8 changed files with 62 additions and 0 deletions

View file

@ -156,6 +156,7 @@ enum VehicleProperty {
SEAT_HEADREST_FORE_AFT_POS = 356518809,
SEAT_HEADREST_FORE_AFT_MOVE = 356518810,
SEAT_EASY_ACCESS_ENABLED = 354421661,
SEAT_CUSHION_SIDE_SUPPORT_POS = 356518815,
SEAT_OCCUPANCY = 356518832,
WINDOW_POS = 322964416,
WINDOW_MOVE = 322964417,

View file

@ -1732,6 +1732,22 @@ enum VehicleProperty {
*/
SEAT_EASY_ACCESS_ENABLED =
0x0B9D + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.BOOLEAN,
/**
* Represents property for seats hipside (bottom cushions side) support position.
*
* The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. All integers
* between minInt32Value and maxInt32Value are supported.
*
* maxInt32Value indicates the widest cushion side support setting (i.e. least support).
* minInt32Value indicates the thinnest cushion side support setting (i.e most support).
*
* This value is not in any particular unit but in a specified range of steps.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
SEAT_CUSHION_SIDE_SUPPORT_POS =
0x0B9F + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
/**
* Seat Occupancy
*

View file

@ -156,6 +156,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
{VehicleProperty::SEAT_HEADREST_FORE_AFT_POS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_HEADREST_FORE_AFT_MOVE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_EASY_ACCESS_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_OCCUPANCY, VehiclePropertyAccess::READ},
{VehicleProperty::WINDOW_POS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::WINDOW_MOVE, VehiclePropertyAccess::READ_WRITE},

View file

@ -156,6 +156,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
{VehicleProperty::SEAT_HEADREST_FORE_AFT_POS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_HEADREST_FORE_AFT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_EASY_ACCESS_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_OCCUPANCY, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::WINDOW_POS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::WINDOW_MOVE, VehiclePropertyChangeMode::ON_CHANGE},

View file

@ -148,6 +148,7 @@ public final class AccessForVehicleProperty {
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_EASY_ACCESS_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_OCCUPANCY, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.WINDOW_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.WINDOW_MOVE, VehiclePropertyAccess.READ_WRITE),

View file

@ -148,6 +148,7 @@ public final class ChangeModeForVehicleProperty {
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_EASY_ACCESS_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_CUSHION_SIDE_SUPPORT_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_OCCUPANCY, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.WINDOW_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.WINDOW_MOVE, VehiclePropertyChangeMode.ON_CHANGE),

View file

@ -1051,6 +1051,41 @@
}
]
},
{
"property": "VehicleProperty::SEAT_CUSHION_SIDE_SUPPORT_POS",
"defaultValue": {
"int32Values": [
0
]
},
"areas": [
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
"maxInt32Value": 10
}
]
},
{
"property": "VehicleProperty::SEAT_OCCUPANCY",
"areas": [

View file

@ -541,6 +541,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatEasyAccessEnabledConfig) {
VehicleArea::SEAT, VehiclePropertyType::BOOLEAN);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatCushionSideSupportPosConfig) {
verifyProperty(VehicleProperty::SEAT_CUSHION_SIDE_SUPPORT_POS,
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
VehiclePropertyGroup::SYSTEM, VehicleArea::SEAT, VehiclePropertyType::INT32);
}
std::vector<ServiceDescriptor> getDescriptors() {
std::vector<ServiceDescriptor> descriptors;
for (std::string name : getAidlHalInstanceNames(IVehicle::descriptor)) {