Update doc for TIRE_PRESSURE.
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: 371636116
Flag: EXEMPT no code change
Change-Id: I784a8fd1218edfb727a60490e7b9ac6f3a26d90f
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 8ef440d..9e0aa0e 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
@@ -194,7 +194,7 @@
{
"name": "Tire pressure",
"value": 392168201,
- "description": "Tire pressure\nEach tires is identified by its areaConfig.areaId config and their minFloatValue\/maxFloatValue are used to store OEM recommended pressure range. The minFloatValue and maxFloatValue in VehicleAreaConfig must be defined. The minFloatValue in the areaConfig data represents the lower bound of the recommended tire pressure. The maxFloatValue in the areaConfig data represents the upper bound of the recommended tire pressure. For example: The following areaConfig indicates the recommended tire pressure of left_front tire is from 200.0 KILOPASCAL to 240.0 KILOPASCAL. .areaConfigs = { VehicleAreaConfig { .areaId = VehicleAreaWheel::LEFT_FRONT, .minFloatValue = 200.0, .maxFloatValue = 240.0, } },"
+ "description": "Tire pressure\n{@code HasSupportedValueInfo.hasMinSupportedValue} and {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} for all areas.\n{@code MinMaxSupportedValueResult.minSupportedValue} represents the lower bound of the recommended tire pressure for the tire at the specified area ID.\n{@code MinMaxSupportedValueResult.maxSupportedValue} represents the upper bound of the recommended tire pressure for the tire at the specified area ID.\nFor example, if the recommended tire pressure of left_front tire is from 200.0 KILOPASCAL to 240.0 KILOPASCAL, {@code getMinMaxSupportedValue} for [propId=TIRE_PRESSURE, areaId=VehicleAreaWheel::LEFT_FRONT] must return a {@code MinMaxSupportedValueResult} with OK status, 200.0 as minSupportedValue, 240.0 as maxSupportedValue.\nFor backward compatibility, minFloatValue and maxFloatValue in {@code VehicleAreaConfig} must be set to the same as minSupportedValue and maxSupportedValue at boot time.\nEach tire is identified by its areaConfig.areaId config.\nFor example: .areaConfigs = { VehicleAreaConfig { .areaId = VehicleAreaWheel::LEFT_FRONT, .minFloatValue = 200.0, .maxFloatValue = 240.0, } },"
},
{
"name": "Critically low tire pressure",
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 e5c09b0..416f7ef 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -525,16 +525,27 @@
/**
* Tire pressure
*
- * Each tires is identified by its areaConfig.areaId config and their
- * minFloatValue/maxFloatValue are used to store OEM recommended pressure
- * range. The minFloatValue and maxFloatValue in VehicleAreaConfig must be defined.
- * The minFloatValue in the areaConfig data represents the lower bound of
- * the recommended tire pressure.
- * The maxFloatValue in the areaConfig data represents the upper bound of
- * the recommended tire pressure.
+ * {@code HasSupportedValueInfo.hasMinSupportedValue} and
+ * {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} for all areas.
+ *
+ * {@code MinMaxSupportedValueResult.minSupportedValue} represents the lower bound of the
+ * recommended tire pressure for the tire at the specified area ID.
+ *
+ * {@code MinMaxSupportedValueResult.maxSupportedValue} represents the upper bound of the
+ * recommended tire pressure for the tire at the specified area ID.
+ *
+ * For example, if the recommended tire pressure of left_front tire is from 200.0 KILOPASCAL to
+ * 240.0 KILOPASCAL, {@code getMinMaxSupportedValue} for
+ * [propId=TIRE_PRESSURE, areaId=VehicleAreaWheel::LEFT_FRONT] must return a
+ * {@code MinMaxSupportedValueResult} with OK status, 200.0 as minSupportedValue, 240.0 as
+ * maxSupportedValue.
+ *
+ * For backward compatibility, minFloatValue and maxFloatValue in {@code VehicleAreaConfig}
+ * must be set to the same as minSupportedValue and maxSupportedValue at boot time.
+ *
+ * Each tire is identified by its areaConfig.areaId config.
+ *
* For example:
- * The following areaConfig indicates the recommended tire pressure
- * of left_front tire is from 200.0 KILOPASCAL to 240.0 KILOPASCAL.
* .areaConfigs = {
* VehicleAreaConfig {
* .areaId = VehicleAreaWheel::LEFT_FRONT,
@@ -545,6 +556,7 @@
*
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ
+ * @require_min_max_supported_value
* @unit VehicleUnit.KILOPASCAL
* @version 2
*/