0

我需要一些关于 types.hal 和 VehiclePropertyIds.java 的信息。我在 types.hal 中添加了如下新属性,

types.hal文件更改,

enum ButtonStatus : int32_t {
    ON = 1,
    OFF = 2
};

/**
 * SunRoofButton
 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
 * @access VehiclePropertyAccess:READ_WRITE
 * @data_enum ButtonStatus
*/
    SunRoof =(
        0x0602
        | VehiclePropertyGroup:VENDOR
        | VehiclePropertyType:INT32
        | VehicleArea:SEAT),
        
What should i do next to get these ids generated in **VehiclePropertyId.java**
Currently am doing following 3 steps 

**Commands :** 

. build/envsetup.sh
lunch aosp_car_x86-userdebug
make -j8

By this the build is successful but i don't see these entries generated in vehiclePropertyIds.java
4

1 回答 1

0

您不应该直接编辑 HAL。

Vehicle HAL 可以通过其他方式进行扩展:您只需将 SunRoof 属性定义为要使用它的位置的整数(您可以引用 VehiclePropertyGroup 和其他枚举,或者只是硬编码 0x25400602 以进行快速而肮脏的测试)。那可能是您的 HAL 实现和面向用户的应用程序。

但是,请仔细检查是否:

  • 您想将 SunRoof 按钮与座位区域相关联(每个座位都有自己的天窗按钮吗?)或只是全局区域
  • 您不想重用 WINDOW_VENT_POS 或 WINDOW_VENT_MOVE
于 2021-03-12T03:52:42.690 回答