Add HAL changes for EV_BRAKE_REGENERATION_LEVEL
Bug: 259451659 Test: atest VtsHalAutomotiveVehicle_TargetTest atest CtsCarTestCases:CarPropertyManagerTest atest CtsCarTestCases:VehiclePropertyIdsTest Change-Id: I07cf21f15cca0cebe25d65dd92eb1dff57c390a1
This commit is contained in:
parent
1de61cdbe8
commit
c69e968ba7
8 changed files with 41 additions and 0 deletions
|
@ -71,6 +71,7 @@ enum VehicleProperty {
|
|||
CURRENT_GEAR = 289408001,
|
||||
PARKING_BRAKE_ON = 287310850,
|
||||
PARKING_BRAKE_AUTO_APPLY = 287310851,
|
||||
EV_BRAKE_REGENERATION_LEVEL = 289408012,
|
||||
FUEL_LEVEL_LOW = 287310853,
|
||||
NIGHT_MODE = 287310855,
|
||||
TURN_SIGNAL_STATE = 289408008,
|
||||
|
|
|
@ -484,6 +484,21 @@ enum VehicleProperty {
|
|||
*/
|
||||
PARKING_BRAKE_AUTO_APPLY = 0x0403 + 0x10000000 + 0x01000000
|
||||
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
|
||||
/**
|
||||
* Regenerative braking level of a electronic vehicle
|
||||
*
|
||||
* The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. All values between
|
||||
* minInt32Value and maxInt32Value must be supported. The minInt32Value must be 0.
|
||||
*
|
||||
* The maxInt32Value in default area's VehicleAreaConfig indicates the maximum amount of energy
|
||||
* regenerated from braking. The minInt32Value in default area's VehicleAreaConfig indicates no
|
||||
* regenerative braking.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.READ_WRITE
|
||||
*/
|
||||
EV_BRAKE_REGENERATION_LEVEL =
|
||||
0x040C + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
/**
|
||||
* Warning for fuel low level.
|
||||
*
|
||||
|
|
|
@ -71,6 +71,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
|
|||
{VehicleProperty::CURRENT_GEAR, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::PARKING_BRAKE_ON, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::PARKING_BRAKE_AUTO_APPLY, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::EV_BRAKE_REGENERATION_LEVEL, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::FUEL_LEVEL_LOW, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::NIGHT_MODE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::TURN_SIGNAL_STATE, VehiclePropertyAccess::READ},
|
||||
|
|
|
@ -71,6 +71,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
|
|||
{VehicleProperty::CURRENT_GEAR, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::PARKING_BRAKE_ON, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::PARKING_BRAKE_AUTO_APPLY, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::EV_BRAKE_REGENERATION_LEVEL, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::FUEL_LEVEL_LOW, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::NIGHT_MODE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::TURN_SIGNAL_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
|
|
|
@ -63,6 +63,7 @@ public final class AccessForVehicleProperty {
|
|||
Map.entry(VehicleProperty.CURRENT_GEAR, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.PARKING_BRAKE_ON, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.PARKING_BRAKE_AUTO_APPLY, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.EV_BRAKE_REGENERATION_LEVEL, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.FUEL_LEVEL_LOW, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.NIGHT_MODE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.TURN_SIGNAL_STATE, VehiclePropertyAccess.READ),
|
||||
|
|
|
@ -63,6 +63,7 @@ public final class ChangeModeForVehicleProperty {
|
|||
Map.entry(VehicleProperty.CURRENT_GEAR, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.PARKING_BRAKE_ON, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.PARKING_BRAKE_AUTO_APPLY, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.EV_BRAKE_REGENERATION_LEVEL, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.FUEL_LEVEL_LOW, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.NIGHT_MODE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.TURN_SIGNAL_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
|
|
|
@ -1528,6 +1528,21 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::EV_BRAKE_REGENERATION_LEVEL",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"areas": [
|
||||
{
|
||||
"areaId": 0,
|
||||
"minInt32Value": 0,
|
||||
"maxInt32Value": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::FUEL_LEVEL_LOW",
|
||||
"defaultValue": {
|
||||
|
|
|
@ -481,6 +481,12 @@ void VtsHalAutomotiveVehicleTargetTest::verifyProperty(VehicleProperty propId,
|
|||
actualPropertyType);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyEvBrakeRegenerationLevelConfig) {
|
||||
verifyProperty(VehicleProperty::EV_BRAKE_REGENERATION_LEVEL,
|
||||
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
|
||||
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDoorChildLockEnabledConfig) {
|
||||
verifyProperty(VehicleProperty::DOOR_CHILD_LOCK_ENABLED, VehiclePropertyAccess::READ_WRITE,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
|
|
Loading…
Reference in a new issue