Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1d02213 authored by Eva Chen's avatar Eva Chen Committed by Android (Google) Code Review
Browse files

Merge changes from topic "ULTRASONICS_SENSOR_ORIENTATION" into main

* changes:
  Add ULTRASONICS_SENSOR_ORIENTATION to emulator defaults.
  Change ULTRASONICS_SENSOR_ORIENTATION hal from int32_vec to float_vec.
parents efe97be6 984293ed
Loading
Loading
Loading
Loading
+163 −0
Original line number Diff line number Diff line
@@ -3594,6 +3594,169 @@
                }
            ]
        },
        {
            "property": "VehicleProperty::ULTRASONICS_SENSOR_ORIENTATION",
            "comment":
                    "Default values for 12 individual ultrasonic sensors installed on the vehicle. Six sensors on the front bumper. Six sensors on the back bumper.",
            "areas": [
                {
                    "defaultValue": {
                        "floatValues": [
                            0.924,
                            0,
                            0,
                            0.383
                        ]
                    },
                    "areaId": 1,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing front left most sensor rotated 45 degrees counter-clockwise."
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            1,
                            0,
                            0,
                            0
                        ]
                    },
                    "areaId": 2,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing front 2nd to the left sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            1,
                            0,
                            0,
                            0
                        ]
                    },
                    "areaId": 4,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing front 3rd to the left sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            1,
                            0,
                            0,
                            0
                        ]
                    },
                    "areaId": 8,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing front 3rd to the right sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            1,
                            0,
                            0,
                            0
                        ]
                    },
                    "areaId": 16,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing front 2nd to the right sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            0.924,
                            0,
                            0,
                            -0.383
                        ]
                    },
                    "areaId": 32,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing front right most sensor rotated 45 degrees clockwise."
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            60,
                            61,
                            62,
                            63
                        ]
                    },
                    "areaId": 64,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing back left most sensor rotated 45 degrees counter-clockwise."
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            70,
                            71,
                            72,
                            73
                        ]
                    },
                    "areaId": 128,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing back 2nd to the left sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            81,
                            82,
                            83,
                            84
                        ]
                    },
                    "areaId": 256,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing back 3rd to the right sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            90,
                            91,
                            92,
                            93
                        ]
                    },
                    "areaId": 512,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing back 3rd to the right sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            100,
                            101,
                            102,
                            103
                        ]
                    },
                    "areaId": 1024,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing back 2nd to the right sensor rotated 0 degrees"
                },
                {
                    "defaultValue": {
                        "floatValues": [
                            110,
                            111,
                            112,
                            113
                        ]
                    },
                    "areaId": 2048,
                    "comment":
                            "Rough quaternion values [w, x, y, z] representing back right most sensor rotated 45 degrees clockwise."
                }
            ]
        },
        {
            "property": "VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_TYPE",
            "defaultValue": {
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ enum VehicleProperty {
  VEHICLE_MAP_SERVICE = (((0x0C00 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299895808 */,
  LOCATION_CHARACTERIZATION = (((0x0C10 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410064 */,
  ULTRASONICS_SENSOR_POSITION = (((0x0C20 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916128 */,
  ULTRASONICS_SENSOR_ORIENTATION = (((0x0C21 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916129 */,
  ULTRASONICS_SENSOR_ORIENTATION = (((0x0C21 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT_VEC) /* 409013281 */,
  ULTRASONICS_SENSOR_FIELD_OF_VIEW = (((0x0C22 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916130 */,
  ULTRASONICS_SENSOR_DETECTION_RANGE = (((0x0C23 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916131 */,
  ULTRASONICS_SENSOR_SUPPORTED_RANGES = (((0x0C24 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916132 */,
+1 −1
Original line number Diff line number Diff line
@@ -3561,7 +3561,7 @@ enum VehicleProperty {
     * @version 3
     */
    ULTRASONICS_SENSOR_ORIENTATION = 0x0C21 + VehiclePropertyGroup.SYSTEM + VehicleArea.VENDOR
            + VehiclePropertyType.INT32_VEC,
            + VehiclePropertyType.FLOAT_VEC,

    /**
     * Static data for the field of view of each ultrasonic sensor in degrees.
+1 −1
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyUltrasonicsSensorPositionConfig)
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyUltrasonicsSensorOrientationConfig) {
    verifyProperty(VehicleProperty::ULTRASONICS_SENSOR_ORIENTATION, VehiclePropertyAccess::READ,
                   VehiclePropertyChangeMode::STATIC, VehiclePropertyGroup::SYSTEM,
                   VehicleArea::VENDOR, VehiclePropertyType::INT32_VEC);
                   VehicleArea::VENDOR, VehiclePropertyType::FLOAT_VEC);
}

TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyUltrasonicsSensorFieldOfViewConfig) {