问题描述
我需要一些关于 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
解决方法
您不应该直接编辑 HAL。
Vehicle HAL 可以通过其他方式扩展:您只需在要使用它的地方将您的 SunRoof 属性定义为一个整数(您可以参考 VehiclePropertyGroup 和其他枚举或只是硬编码 0x25400602 以进行快速和肮脏的测试)。这可能是您的 HAL 实现和面向用户的应用。
但是,请仔细检查是否:
- 您想将您的天窗按钮与座位区域相关联(每个座位都有自己的天窗按钮吗?)或只是全局区域
- 您不想重复使用 WINDOW_VENT_POS 或 WINDOW_VENT_MOVE