1# 泛Sensor子系统JS API变更 2 3OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,泛Sensor子系统的API变更如下: 4 5## 接口变更 6 7| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | 8|---|---|---|---| 9| ohos.sensor | SensorType | SENSOR_TYPE_ID_HEART_BEAT_RATE = 278 | 新增 | 10| ohos.sensor | SensorType | SENSOR_TYPE_ID_LINEAR_ACCELEROMETER = 258 | 新增 | 11| ohos.sensor | sensor | getSensorLists(callback: AsyncCallback\<Array\<Sensor>>): void;<br>getSensorLists(): Promise\<Array\<Sensor>>; | 新增 | 12| ohos.sensor | sensor | getSingleSensor(type: SensorType, callback: AsyncCallback\<Sensor>): void;<br>getSingleSensor(type: SensorType): Promise\<Sensor>; | 新增 | 13| ohos.sensor | Sensor | power:number; | 新增 | 14| ohos.sensor | Sensor | precision:number; | 新增 | 15| ohos.sensor | Sensor | maxRange:number; | 新增 | 16| ohos.sensor | Sensor | sensorTypeId:number; | 新增 | 17| ohos.sensor | Sensor | hardwareVersion:string; | 新增 | 18| ohos.sensor | Sensor | firmwareVersion:string; | 新增 | 19| ohos.sensor | Sensor | venderName:string; | 新增 | 20| ohos.sensor | Sensor | sensorName:string; | 新增 | 21| ohos.sensor | SensorType | SENSOR_TYPE_ID_HEART_RATE = 278 | 废弃 | 22| ohos.sensor | SensorType | SENSOR_TYPE_ID_LINEAR_ACCELERATION = 258 | 废弃 | 23