SENSOR_TYPE_ID_BAROMETER = 8, SENSOR_TYPE_ID_TEMPERATURE = 9, SENSOR_TYPE_ID_HALL = 10, SENSOR_TYPE_ID_GESTURE = 11, SENSOR_TYPE_ID_PROXIMITY = 12, SENSOR_TYPE_ID_HUMIDITY = 13, SENSOR_TYPE_ID_PHYSICAL_MAX = 0xFF, SENSOR_TYPE_ID_ORIENTATION = 256, SENSOR_TYPE_ID_GRAVITY = 257...
on(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: Callback,options?: Options): void 监听重力传感器的数据变化。如果多次调用该接口,仅最后一次调用生效。 系统能力:SystemCapability.Sensors.Sensor 参数: 示例: sensor.on(sensor.SensorType.SENSOR_TYPE_ID_GRAVITY,function(data){ console.info('X-coord...
HDF_SENSOR_TYPE_HUMIDITY 湿度传感器。 HDF_SENSOR_TYPE_MEDICAL_BEGIN 医疗传感器ID枚举值范围的开始。 HDF_SENSOR_TYPE_MEDICAL_END 医疗传感器ID枚举值范围的结束。 HDF_SENSOR_TYPE_PHYSICAL_MAX 物理传感器最大类型。 HDF_SENSOR_TYPE_ORIENTATION 方向传感器。 HDF_SENSOR_TYPE_GRAVITY 重力传感器。 HDF_SENSOR_...
SENSOR_TYPE_ID_BAROMETER = 8, SENSOR_TYPE_ID_TEMPERATURE = 9, SENSOR_TYPE_ID_HALL = 10, SENSOR_TYPE_ID_GESTURE = 11, SENSOR_TYPE_ID_PROXIMITY = 12, SENSOR_TYPE_ID_HUMIDITY = 13, SENSOR_TYPE_ID_PHYSICAL_MAX = 0xFF, SENSOR_TYPE_ID_ORIENTATION = 256, SENSOR_TYPE_ID_GRAVITY = 257...
off(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback?: Callback<GravityResponse>): void;off(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback?: Callback<GyroscopeResponse>): void;off(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback?: Callback<GyroscopeUncalibratedResponse>): ...
ohos.sensor SensorType SENSOR_TYPE_ID_ORIENTATION 新增 ohos.sensor SensorType SENSOR_TYPE_ID_GRAVITY 新增 ohos.sensor SensorType SENSOR_TYPE_ID_LINEAR_ACCELERATION 新增 ohos.sensor SensorType SENSOR_TYPE_ID_ROTATION_VECTOR 新增 ohos.sensor SensorType SENSOR_TYPE_ID_AMBIENT_TEMPER...
开发者ID:HyfUestc,项目名称:PDR,代码行数:19, 示例4: isXYZ ▲点赞 2▼ privatebooleanisXYZ(Sensor s){switch(s.getType()) {caseSensor.TYPE_ACCELEROMETER:caseSensor.TYPE_GRAVITY:caseSensor.TYPE_GYROSCOPE:caseSensor.TYPE_LINEAR_ACCELERATION:caseSensor.TYPE_MAGNETIC_FIELD:caseSensor.TYPE_ROTATION_VECTO...
(1<<SENSOR_TYPE_GRAVITY) | (1<<SENSOR_TYPE_LINEAR_ACCELERATION) | (1<<SENSOR_TYPE_ROTATION_VECTOR); mLastEventSeen.setCapacity(count); for(ssize_t i=0 ; i<count ; i++) { registerSensor(newHardwareSensor(list[i]) ); switch(list[i].type) { ...
(1<<SENSOR_TYPE_GRAVITY) | (1<<SENSOR_TYPE_LINEAR_ACCELERATION) | (1<<SENSOR_TYPE_ROTATION_VECTOR); sensor_t const* list; int count = dev.getSensorList(&list); mLastEventSeen.setCapacity(count); for (int i=0 ; i<count ; i++) { registerSensor( new HardwareSensor(list[i]) );...
case SENSOR_TYPE_GYROSCOPE: case SENSOR_TYPE_GYROSCOPE_UNCALIBRATED: hasGyro = true; break; case SENSOR_TYPE_GRAVITY: case SENSOR_TYPE_LINEAR_ACCELERATION: case SENSOR_TYPE_ROTATION_VECTOR: virtualSensorsNeeds &= ~(1<<list[i].type);