mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Add DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED to HAL layer." into main
This commit is contained in:
@@ -273,6 +273,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
|
||||
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
};
|
||||
|
||||
} // namespace vehicle
|
||||
|
||||
@@ -273,6 +273,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
|
||||
{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},
|
||||
{VehicleProperty::DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
};
|
||||
|
||||
} // namespace vehicle
|
||||
|
||||
@@ -264,7 +264,8 @@ public final class AccessForVehicleProperty {
|
||||
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyAccess.READ),
|
||||
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)
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED, VehiclePropertyAccess.READ_WRITE)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -264,7 +264,8 @@ public final class ChangeModeForVehicleProperty {
|
||||
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyChangeMode.CONTINUOUS),
|
||||
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)
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED, VehiclePropertyChangeMode.ON_CHANGE)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -3545,6 +3545,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::INITIAL_USER_INFO"
|
||||
},
|
||||
|
||||
@@ -271,4 +271,5 @@ enum VehicleProperty {
|
||||
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 */,
|
||||
DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED = (((0x1019 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313945 */,
|
||||
}
|
||||
|
||||
@@ -5087,6 +5087,28 @@ enum VehicleProperty {
|
||||
HANDS_ON_DETECTION_WARNING =
|
||||
0x1018 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Enable or disable driver drowsiness and attention monitoring.
|
||||
*
|
||||
* Set true to enable driver drowsiness and attention monitoring and false to disable driver
|
||||
* drowsiness and attention monitoring. When driver drowsiness and attention monitoring is
|
||||
* enabled, a system inside the vehicle should be monitoring the drowsiness and attention level
|
||||
* of the driver and warn the driver if needed.
|
||||
*
|
||||
* In general, DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED should always return true or false.
|
||||
* If the feature is not available due to some temporary state, that information must be
|
||||
* conveyed through the ErrorState values in the DRIVER_DROWSINESS_ATTENTION_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
|
||||
*/
|
||||
DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED =
|
||||
0x1019 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
|
||||
|
||||
/***************************************************************************
|
||||
* End of ADAS Properties
|
||||
**************************************************************************/
|
||||
|
||||
@@ -621,6 +621,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyHandsOnDetectionWarningConfig) {
|
||||
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverDrowsinessAttentionSystemEnabledConfig) {
|
||||
verifyProperty(VehicleProperty::DRIVER_DROWSINESS_ATTENTION_SYSTEM_ENABLED,
|
||||
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
|
||||
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyEvBrakeRegenerationLevelConfig) {
|
||||
verifyProperty(VehicleProperty::EV_BRAKE_REGENERATION_LEVEL,
|
||||
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
|
||||
|
||||
Reference in New Issue
Block a user