@ray-js/ipc-player-integration 0.0.42 → 0.0.43-beta.2

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.
@@ -1,5 +1,7 @@
1
1
  export * from './useBattery';
2
2
  export * from './useHumidity';
3
+ export * from './useEc';
4
+ export * from './useWaterTemperature';
3
5
  export * from './useTemperature';
4
6
  export * from './useSignal4G';
5
7
  export * from './useDpState';
@@ -1,5 +1,7 @@
1
1
  export * from './useBattery';
2
2
  export * from './useHumidity';
3
+ export * from './useEc';
4
+ export * from './useWaterTemperature';
3
5
  export * from './useTemperature';
4
6
  export * from './useSignal4G';
5
7
  export * from './useDpState';
@@ -0,0 +1 @@
1
+ export declare const useEc: (devId: string) => string;
@@ -0,0 +1,24 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { useDpState } from '../useDpState';
3
+ import { IPC_EC } from '../../utils/content/dpCode';
4
+ import { showMathPowValue } from '../../utils/device';
5
+ export const useEc = devId => {
6
+ const [ec, setEc] = useState('');
7
+ const [dpState, schemaObj] = useDpState({
8
+ devId,
9
+ dpCodes: [IPC_EC]
10
+ });
11
+ useEffect(() => {
12
+ var _schema$property;
13
+ if (dpState[IPC_EC] === undefined) {
14
+ setEc('');
15
+ return;
16
+ }
17
+ const schema = schemaObj === null || schemaObj === void 0 ? void 0 : schemaObj[IPC_EC];
18
+ const scale = (schema === null || schema === void 0 || (_schema$property = schema.property) === null || _schema$property === void 0 ? void 0 : _schema$property.scale) || 0;
19
+ // const unit = schema?.property?.unit || 'μS/cm';
20
+ const value = showMathPowValue(dpState[IPC_EC], scale);
21
+ setEc(`${value}`);
22
+ }, [dpState, schemaObj]);
23
+ return ec;
24
+ };
@@ -0,0 +1 @@
1
+ export declare const useWaterTemperature: (devId: string) => string;
@@ -0,0 +1,23 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { useDpState } from '../useDpState';
3
+ import { IPC_WATER_TEMPERATURE } from '../../utils/content/dpCode';
4
+ import { showMathPowValue } from '../../utils/device';
5
+ export const useWaterTemperature = devId => {
6
+ const [waterTemp, setWaterTemp] = useState('');
7
+ const [dpState, schemaObj] = useDpState({
8
+ devId,
9
+ dpCodes: [IPC_WATER_TEMPERATURE]
10
+ });
11
+ useEffect(() => {
12
+ var _schema$property;
13
+ if (dpState[IPC_WATER_TEMPERATURE] === undefined) {
14
+ setWaterTemp('');
15
+ return;
16
+ }
17
+ const schema = schemaObj === null || schemaObj === void 0 ? void 0 : schemaObj[IPC_WATER_TEMPERATURE];
18
+ const scale = (schema === null || schema === void 0 || (_schema$property = schema.property) === null || _schema$property === void 0 ? void 0 : _schema$property.scale) || 0;
19
+ const value = showMathPowValue(dpState[IPC_WATER_TEMPERATURE], scale);
20
+ setWaterTemp(`${value}°C`);
21
+ }, [dpState, schemaObj]);
22
+ return waterTemp;
23
+ };
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "icon-panel"; /* Project id 4727767 */
3
- src: url('iconfont.woff2?t=1780628706398') format('woff2'),
4
- url('iconfont.woff?t=1780628706398') format('woff'),
5
- url('iconfont.ttf?t=1780628706398') format('truetype');
3
+ src: url('iconfont.woff2?t=1782702695877') format('woff2'),
4
+ url('iconfont.woff?t=1782702695877') format('woff'),
5
+ url('iconfont.ttf?t=1782702695877') format('truetype');
6
6
  }
7
7
 
8
8
  .icon-panel {
@@ -13,6 +13,34 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .icon-panel-lvye1:before {
17
+ content: "\e6ce";
18
+ }
19
+
20
+ .icon-panel-lvye:before {
21
+ content: "\e6cd";
22
+ }
23
+
24
+ .icon-panel-zhiwujilu:before {
25
+ content: "\e6cc";
26
+ }
27
+
28
+ .icon-panel-shuiwei:before {
29
+ content: "\e6c8";
30
+ }
31
+
32
+ .icon-panel-ECzhi:before {
33
+ content: "\e6c9";
34
+ }
35
+
36
+ .icon-panel-dengguang:before {
37
+ content: "\e6ca";
38
+ }
39
+
40
+ .icon-panel-zongkaiguan:before {
41
+ content: "\e6cb";
42
+ }
43
+
16
44
  .icon-panel-zhinenghuazhi-guanbi:before {
17
45
  content: "\e6c7";
18
46
  }