Update doc for ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE.
Part of a large doc update. Add doc for new supported value range
APIs. For be backward compatible with older VHAL clients still
using deprecated fields, we still require the old fields to be
populated.
Test: None
Bug: 383184445
Flag: EXEMPT no code change
Change-Id: I5f2900444c840e2d712a77432c1ac92858c4d25d
diff --git a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
index da73b03..e574a43 100644
--- a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
+++ b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
@@ -1339,12 +1339,12 @@
{
"name": "EV_CHARGE_CURRENT_DRAW_LIMIT",
"value": 291508031,
- "description": "Indicates the maximum current draw threshold for charging set by the user\nconfigArray[0] is used to specify the max current draw allowed by the vehicle in Amperes.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "Indicates the maximum current draw threshold for charging set by the user\nconfigArray[0] is used to specify the max current draw allowed by the vehicle in Amperes at boot time.\nIf {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}, {@code HasSupportedValueInfo.hasMaxSupportedValue} and {@code HasSupportedValueInfo.hasMinSupportedValue} must be {@code true}. {@code MinMaxSupportedValueResult.maxSupportedValue} specifies the max current draw allowed by the vehicle in Amperes at the current moment. {@code MinMaxSupportedValueResult.minSupportedValue} must be 0. At boot, configArray[0] is equal to maxSupportedValue.\nIf the max current draw allowed by the vehicle may change dynamically, {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} and {@code MinMaxSupportedValueResult.maxSupportedValue} must be implemented.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "EV_CHARGE_PERCENT_LIMIT",
"value": 291508032,
- "description": "Indicates the maximum charge percent threshold set by the user\nReturns a float value from 0 to 100.\nconfigArray is used to specify the valid values. For example, if the vehicle supports the following charge percent limit values: [20, 40, 60, 80, 100] then the configArray should be {20, 40, 60, 80, 100} If the configArray is empty then all values from 0 to 100 must be valid.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "Indicates the maximum charge percent threshold set by the user\nReturns a float value from 0 to 100.\nconfigArray is used to specify the valid values at boot time. For example, if the vehicle supports the following charge percent limit values: [20, 40, 60, 80, 100] then the configArray should be {20, 40, 60, 80, 100} If the configArray is empty then all values from 0 to 100 must be valid.\nIf {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}, {@code HasSupportedValueInfo.hasSupportedValuesList} must be {@code true}. {@code SupportedValuesListResult#supportedValuesList} specifies the valid maximum charge percent threshold options at the current moment. At boot, configArray content must match the supported values list.\nIf the valid values may change dynamically, {@code HasSupportedValueInfo.hasSupportedValuesList} must be {@code true} and {@code SupportedValuesListResult#supportedValuesList} must be implemented.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "Charging state of the car",
@@ -1604,17 +1604,17 @@
{
"name": "CRUISE_CONTROL_TARGET_SPEED",
"value": 291508243,
- "description": "Current target speed for Cruise Control (CC).\nOEMs should set the minFloatValue and maxFloatValue values for this property to define the min and max target speed values. These values must be non-negative.\nThe maxFloatValue represents the upper bound of the target speed. The minFloatValue represents the lower bound of the target speed.\nWhen this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW."
+ "description": "Current target speed for Cruise Control (CC).\nOEMs should set the minFloatValue and maxFloatValue values for this property to define the min and max target speed values. These values must be non-negative.\nThe minFloatValue represents the lower bound of the target speed.\nThe maxFloatValue represents the upper bound of the target speed.\nIf {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}: {@code HasSupportedValueInfo.hasMinSupportedValue} and {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true}. {@code MinMaxSupportedValueResult.minSupportedValue} has the same meaning as minFloatValue. {@code MinMaxSupportedValueResult.maxSupportedValue} has the same meaning as maxFloatValue.\nWhen this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW."
},
{
"name": "ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP",
"value": 289411092,
- "description": "Current target time gap for Adaptive Cruise Control (ACC) or Predictive Cruise Control in milliseconds.\nThis 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.\nThe 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.\nWhen this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "Current target time gap for Adaptive Cruise Control (ACC) or Predictive Cruise Control in milliseconds.\nThis 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.\nThe possible values to set for the target time gap at boot time should be specified in configArray in ascending order. All values must be positive. If the property is writable, all values must be writable.\nIf {@code HasSupportedValueInfo} is not {@code null}, {@code HasSupportedValueInfo.hasSupportedValuesList} must be {@code true}. The supported values list represents the possible values to set at the current moment.\nIf the possible values to set may change dynamically, {@code HasSupportedValueInfo.hasSupportedValuesList} must be {@code true} and the supported values list must be implemented.\nWhen this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE",
"value": 289411093,
- "description": "Measured distance from leading vehicle when using Adaptive Cruise Control (ACC) or Predictive Cruise Control.\nReturns the measured distance in millimeters between the rear-most point of the leading vehicle and the front-most point of the ACC vehicle.\nThe maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. The minInt32Value should be 0. The maxInt32Value should be populated with the maximum range the distance sensor can support. This value should be non-negative.\nWhen no lead vehicle is detected (that is, when there is no leading vehicle or the leading vehicle is too far away for the sensor to detect), this property should return StatusCode.NOT_AVAILABLE.\nWhen this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW."
+ "description": "Measured distance from leading vehicle when using Adaptive Cruise Control (ACC) or Predictive Cruise Control.\nReturns the measured distance in millimeters between the rear-most point of the leading vehicle and the front-most point of the ACC vehicle.\nThe maxInt32Value and minInt32Value in VehicleAreaConfig must be defined.\nThe minInt32Value should be 0.\nThe maxInt32Value should be populated with the maximum range the distance sensor can support. This value should be non-negative.\nIf {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}: {@code HasSupportedValueInfo.hasMinSupportedValue} and {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true}. {@code MinMaxSupportedValueResult.minSupportedValue} has the same meaning as minInt32Value. {@code MinMaxSupportedValueResult.maxSupportedValue} has the same meaning as maxInt32Value.\nWhen no lead vehicle is detected (that is, when there is no leading vehicle or the leading vehicle is too far away for the sensor to detect), this property should return StatusCode.NOT_AVAILABLE.\nWhen this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW."
},
{
"name": "HANDS_ON_DETECTION_ENABLED",
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index 8eb4fe6..37c3505 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -6914,10 +6914,18 @@
* vehicle and the front-most point of the ACC vehicle.
*
* The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined.
+ *
* The minInt32Value should be 0.
+ *
* The maxInt32Value should be populated with the maximum range the distance sensor can support.
* This value should be non-negative.
*
+ * If {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}:
+ * {@code HasSupportedValueInfo.hasMinSupportedValue} and
+ * {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true}.
+ * {@code MinMaxSupportedValueResult.minSupportedValue} has the same meaning as minInt32Value.
+ * {@code MinMaxSupportedValueResult.maxSupportedValue} has the same meaning as maxInt32Value.
+ *
* When no lead vehicle is detected (that is, when there is no leading vehicle or the leading
* vehicle is too far away for the sensor to detect), this property should return
* StatusCode.NOT_AVAILABLE.
@@ -6932,6 +6940,7 @@
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ
* @unit VehicleUnit.MILLIMETER
+ * @require_min_max_supported_value
* @version 2
*/
ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE =