@react-native-ohos/react-native-sensors 7.2.3-rc.1 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@ This project is based on [react-native-sensors](https://github.com/react-native-
|
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
7
|
-
- [中文](https://
|
|
7
|
+
- [中文](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/zh-cn/react-native-sensors.md)
|
|
8
8
|
|
|
9
|
-
- [English](https://
|
|
9
|
+
- [English](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/en/react-native-sensors.md)
|
|
10
10
|
|
|
11
11
|
## License
|
|
12
12
|
|
|
@@ -66,7 +66,7 @@ export class RTNSensorsTurboModule extends TurboModule implements RTNSensors.Spe
|
|
|
66
66
|
timestamp: data?.timestamp
|
|
67
67
|
})}`)
|
|
68
68
|
}
|
|
69
|
-
this.ctx.rnInstance.emitDeviceEvent('
|
|
69
|
+
this.ctx.rnInstance.emitDeviceEvent('Accelerometer', {
|
|
70
70
|
x: data?.x,
|
|
71
71
|
y: data?.y,
|
|
72
72
|
z: data?.z,
|
|
@@ -95,7 +95,7 @@ export class RTNSensorsTurboModule extends TurboModule implements RTNSensors.Spe
|
|
|
95
95
|
timestamp: data?.timestamp
|
|
96
96
|
})}`)
|
|
97
97
|
}
|
|
98
|
-
this.ctx.rnInstance.emitDeviceEvent('
|
|
98
|
+
this.ctx.rnInstance.emitDeviceEvent('Gyroscope', {
|
|
99
99
|
x: data?.x,
|
|
100
100
|
y: data?.y,
|
|
101
101
|
z: data?.z,
|
|
@@ -124,7 +124,7 @@ export class RTNSensorsTurboModule extends TurboModule implements RTNSensors.Spe
|
|
|
124
124
|
timestamp: data?.timestamp
|
|
125
125
|
})}`)
|
|
126
126
|
}
|
|
127
|
-
this.ctx.rnInstance.emitDeviceEvent('
|
|
127
|
+
this.ctx.rnInstance.emitDeviceEvent('Magnetometer', {
|
|
128
128
|
x: data?.x,
|
|
129
129
|
y: data?.y,
|
|
130
130
|
z: data?.z,
|
|
@@ -150,7 +150,7 @@ export class RTNSensorsTurboModule extends TurboModule implements RTNSensors.Spe
|
|
|
150
150
|
pressure: data?.pressure
|
|
151
151
|
})}`)
|
|
152
152
|
}
|
|
153
|
-
this.ctx.rnInstance.emitDeviceEvent('
|
|
153
|
+
this.ctx.rnInstance.emitDeviceEvent('Barometer', {
|
|
154
154
|
pressure: data?.pressure
|
|
155
155
|
});
|
|
156
156
|
}, { interval: interval });
|
|
@@ -176,7 +176,7 @@ export class RTNSensorsTurboModule extends TurboModule implements RTNSensors.Spe
|
|
|
176
176
|
timestamp: data?.timestamp
|
|
177
177
|
})}`)
|
|
178
178
|
}
|
|
179
|
-
this.ctx.rnInstance.emitDeviceEvent('
|
|
179
|
+
this.ctx.rnInstance.emitDeviceEvent('Orientation', {
|
|
180
180
|
x: data?.beta,
|
|
181
181
|
y: data?.gamma,
|
|
182
182
|
z: data?.alpha,
|
package/harmony/sensors.har
CHANGED
|
Binary file
|
package/package.json
CHANGED