Added LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED to HAL
Bug: 314786275 Test: atest VtsHalAutomotiveVehicle_TargetTest Change-Id: Ic80eed8362bba273bac409c175a726317054de7e
This commit is contained in:
parent
555598956e
commit
d11b9f832f
8 changed files with 50 additions and 3 deletions
|
@ -294,6 +294,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
|
|||
{VehicleProperty::LOW_SPEED_COLLISION_WARNING_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::CROSS_TRAFFIC_MONITORING_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
};
|
||||
|
||||
} // namespace vehicle
|
||||
|
|
|
@ -294,6 +294,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
|
|||
{VehicleProperty::LOW_SPEED_COLLISION_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::CROSS_TRAFFIC_MONITORING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
};
|
||||
|
||||
} // namespace vehicle
|
||||
|
|
|
@ -285,7 +285,8 @@ public final class AccessForVehicleProperty {
|
|||
Map.entry(VehicleProperty.LOW_SPEED_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.LOW_SPEED_COLLISION_WARNING_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyAccess.READ)
|
||||
Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE)
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
@ -285,7 +285,8 @@ public final class ChangeModeForVehicleProperty {
|
|||
Map.entry(VehicleProperty.LOW_SPEED_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LOW_SPEED_COLLISION_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE)
|
||||
Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE)
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
@ -4204,6 +4204,14 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
1
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -292,4 +292,5 @@ enum VehicleProperty {
|
|||
LOW_SPEED_COLLISION_WARNING_STATE = (((0x1022 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411106 */,
|
||||
CROSS_TRAFFIC_MONITORING_ENABLED = (((0x1023 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313955 */,
|
||||
CROSS_TRAFFIC_MONITORING_WARNING_STATE = (((0x1024 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411108 */,
|
||||
LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED = (((0x1025 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313957 */,
|
||||
}
|
||||
|
|
|
@ -4670,7 +4670,9 @@ enum VehicleProperty {
|
|||
* Enable or disable Automatic Emergency Braking (AEB).
|
||||
*
|
||||
* Set true to enable AEB and false to disable AEB. When AEB is enabled, the ADAS system in the
|
||||
* vehicle should be turned on and monitoring to avoid potential collisions.
|
||||
* vehicle should be turned on and monitoring to avoid potential collisions. This property
|
||||
* should apply for higher speed applications only. For enabling low speed automatic emergency
|
||||
* braking, LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED should be used.
|
||||
*
|
||||
* In general, AUTOMATIC_EMERGENCY_BRAKING_ENABLED should always return true or false. If the
|
||||
* feature is not available due to some temporary state, such as the vehicle speed being too
|
||||
|
@ -5517,6 +5519,32 @@ enum VehicleProperty {
|
|||
CROSS_TRAFFIC_MONITORING_WARNING_STATE =
|
||||
0x1024 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Enable or disable Low Speed Automatic Emergency Braking.
|
||||
*
|
||||
* Set true to enable Low Speed Automatic Emergency Braking or false to disable Low Speed
|
||||
* Automatic Emergency Braking. When Low Speed Automatic Emergency Braking is enabled, the ADAS
|
||||
* system in the vehicle should be turned on and monitoring to avoid potential collisions in low
|
||||
* speed conditions. This property is different from the pre-existing
|
||||
* AUTOMATIC_EMERGENCY_BRAKING_ENABLED, which should apply to higher speed applications only. If
|
||||
* the vehicle doesn't have a separate collision avoidance system for low speed environments,
|
||||
* this property should not be implemented.
|
||||
*
|
||||
* In general, LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED should always return true or false.
|
||||
* If the feature is not available due to some temporary state, such as the vehicle speed being
|
||||
* too low, that information must be conveyed through the ErrorState values in the
|
||||
* LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE property.
|
||||
*
|
||||
* This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
|
||||
* implement it as VehiclePropertyAccess.READ only.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.READ_WRITE
|
||||
* @access VehiclePropertyAccess.READ
|
||||
*/
|
||||
LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED =
|
||||
0x1025 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
|
||||
|
||||
/***************************************************************************
|
||||
* End of ADAS Properties
|
||||
**************************************************************************/
|
||||
|
|
|
@ -1017,6 +1017,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyHeadUpDisplayEnabledConfig) {
|
|||
VehicleArea::SEAT, VehiclePropertyType::BOOLEAN);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLowSpeedAutomaticEmergencyBrakingEnabledConfig) {
|
||||
verifyProperty(VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED,
|
||||
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
|
||||
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
|
||||
}
|
||||
|
||||
bool VtsHalAutomotiveVehicleTargetTest::checkIsSupported(int32_t propertyId) {
|
||||
auto result = mVhalClient->getPropConfigs({propertyId});
|
||||
return result.ok();
|
||||
|
|
Loading…
Reference in a new issue