mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Added ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP to HAL layer." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ac867e5ec7
@@ -266,6 +266,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
|
||||
{VehicleProperty::CRUISE_CONTROL_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::CRUISE_CONTROL_COMMAND, VehiclePropertyAccess::WRITE},
|
||||
{VehicleProperty::CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess::READ},
|
||||
|
||||
@@ -266,6 +266,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
|
||||
{VehicleProperty::CRUISE_CONTROL_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::CRUISE_CONTROL_COMMAND, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
|
||||
@@ -258,6 +258,7 @@ public final class AccessForVehicleProperty {
|
||||
Map.entry(VehicleProperty.CRUISE_CONTROL_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.CRUISE_CONTROL_COMMAND, VehiclePropertyAccess.WRITE),
|
||||
Map.entry(VehicleProperty.CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess.READ),
|
||||
|
||||
@@ -258,6 +258,7 @@ public final class ChangeModeForVehicleProperty {
|
||||
Map.entry(VehicleProperty.CRUISE_CONTROL_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.CRUISE_CONTROL_COMMAND, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
|
||||
@@ -3263,6 +3263,22 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
1200
|
||||
]
|
||||
},
|
||||
"configArray": [
|
||||
1200,
|
||||
1400,
|
||||
1600,
|
||||
1800,
|
||||
2000,
|
||||
2200
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::HANDS_ON_DETECTION_ENABLED",
|
||||
"defaultValue": {
|
||||
|
||||
@@ -264,6 +264,7 @@ enum VehicleProperty {
|
||||
CRUISE_CONTROL_STATE = (((0x1011 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411089 */,
|
||||
CRUISE_CONTROL_COMMAND = (((0x1012 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411090 */,
|
||||
CRUISE_CONTROL_TARGET_SPEED = (((0x1013 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291508243 */,
|
||||
ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP = (((0x1014 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411092 */,
|
||||
HANDS_ON_DETECTION_ENABLED = (((0x1016 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313942 */,
|
||||
HANDS_ON_DETECTION_DRIVER_STATE = (((0x1017 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411095 */,
|
||||
HANDS_ON_DETECTION_WARNING = (((0x1018 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411096 */,
|
||||
|
||||
@@ -4014,6 +4014,28 @@ enum VehicleProperty {
|
||||
CRUISE_CONTROL_TARGET_SPEED =
|
||||
0x1013 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.FLOAT,
|
||||
|
||||
/**
|
||||
* Current target time gap for Adaptive Cruise Control (ACC) or Predictive Cruise Control in
|
||||
* milliseconds.
|
||||
*
|
||||
* This property should specify the target time gap to a leading vehicle. This gap is defined as
|
||||
* the time to travel the distance between the leading vehicle's rear-most point to the ACC
|
||||
* vehicle's front-most point. The actual time gap from a leading vehicle can be above or below
|
||||
* this value.
|
||||
*
|
||||
* The possible values to set for the target time gap should be specified in configArray in
|
||||
* ascending order. All values must be positive. If the property is writable, all values must be
|
||||
* writable.
|
||||
*
|
||||
* Writing to this property when it is not available should return StatusCode.NOT_AVAILABLE.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.READ_WRITE
|
||||
* @unit VehicleUnit:MILLI_SECS
|
||||
*/
|
||||
ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP =
|
||||
0x1014 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Enable or disable hands on detection (HOD).
|
||||
*
|
||||
|
||||
@@ -540,6 +540,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyCruiseControlTargetSpeedConfig)
|
||||
VehicleArea::GLOBAL, VehiclePropertyType::FLOAT);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyAdaptiveCruiseControlTargetTimeGapConfig) {
|
||||
verifyProperty(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP,
|
||||
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
|
||||
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyHandsOnDetectionEnabledConfig) {
|
||||
verifyProperty(VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
|
||||
Reference in New Issue
Block a user