This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
field.js
160 lines (130 loc) · 2.89 KB
/
field.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
const PARTICLE_CONCENTRATION_PM1_0_NORMAL = {
key: 'concentration_pm1.0_normal',
unit: 'µg/m^3',
len: 2
};
const PARTICLE_CONCENTRATION_PM2_5_NORMAL = {
key: 'concentration_pm2.5_normal',
unit: 'µg/m^3',
len: 2
};
const PARTICLE_CONCENTRATION_PM10_NORMAL = {
key: 'concentration_pm10_normal',
unit: 'µg/m^3',
len: 2
};
const PARTICLE_CONCENTRATION_PM1_0_ATMOS = {
key: 'concentration_pm1.0_atmos',
unit: 'µg/m^3',
len: 2
};
const PARTICLE_CONCENTRATION_PM2_5_ATMOS = {
key: 'concentration_pm2.5_atmos',
unit: 'µg/m^3',
len: 2
};
const PARTICLE_CONCENTRATION_PM10_ATMOS = {
key: 'concentration_pm10_atmos',
unit: 'µg/m^3',
len: 2
};
const PARTICLE_COUNT_PM0_3 = {
key: 'count_pm_0.3',
len: 2
};
const PARTICLE_COUNT_PM0_5 = {
key: 'count_pm_0.5',
len: 2
};
const PARTICLE_COUNT_PM1_0 = {
key: 'count_pm_1.0',
len: 2
};
const PARTICLE_COUNT_PM2_5 = {
key: 'count_pm_2.5',
len: 2
};
const PARTICLE_COUNT_PM5 = {
key: 'count_pm_5',
len: 2
};
const PARTICLE_COUNT_PM10 = {
key: 'count_pm_10',
len: 2
};
const TEMPERATURE = {
key: 'temperature',
formatter: v => v / 10,
unit: '℃',
len: 2
};
const HUMIDITY = {
key: 'humidity',
formatter: v => v / 10,
unit: '%',
len: 2
};
const FORMALDEHYDE = {
key: 'formaldehyde',
formatter: v => v / 1000,
unit: 'mg/m^3',
len: 2
};
const CO2 = {
key: 'co2',
unit: 'ppm',
len: 2
};
const CO2_PARAMETER_1 = {
key: 'co2_parameter_1',
len: 2
};
const CO2_PARAMETER_2 = {
key: 'co2_parameter_2',
len: 2
};
const TVOC = {
key: 'tvoc',
len: 2
};
const TVOC_EQ = {
key: 'tvoc_eq',
len: 1
};
const FORMALDEHYDE_EQ = {
key: 'formaldehyde_eq',
len: 1
};
const VERSION = {
key: 'version'
};
const ERROR = {
key: 'error'
};
const RETAINED = {
key: 'retained',
len: 2
};
module.exports = {
PARTICLE_CONCENTRATION_PM1_0_NORMAL: PARTICLE_CONCENTRATION_PM1_0_NORMAL,
PARTICLE_CONCENTRATION_PM2_5_NORMAL: PARTICLE_CONCENTRATION_PM2_5_NORMAL,
PARTICLE_CONCENTRATION_PM10_NORMAL: PARTICLE_CONCENTRATION_PM10_NORMAL,
PARTICLE_CONCENTRATION_PM1_0_ATMOS: PARTICLE_CONCENTRATION_PM1_0_ATMOS,
PARTICLE_CONCENTRATION_PM2_5_ATMOS: PARTICLE_CONCENTRATION_PM2_5_ATMOS,
PARTICLE_CONCENTRATION_PM10_ATMOS: PARTICLE_CONCENTRATION_PM10_ATMOS,
PARTICLE_COUNT_PM0_3: PARTICLE_COUNT_PM0_3,
PARTICLE_COUNT_PM0_5: PARTICLE_COUNT_PM0_5,
PARTICLE_COUNT_PM1_0: PARTICLE_COUNT_PM1_0,
PARTICLE_COUNT_PM2_5: PARTICLE_COUNT_PM2_5,
PARTICLE_COUNT_PM5: PARTICLE_COUNT_PM5,
PARTICLE_COUNT_PM10: PARTICLE_COUNT_PM10,
TEMPERATURE: TEMPERATURE,
HUMIDITY: HUMIDITY,
FORMALDEHYDE: FORMALDEHYDE,
CO2: CO2,
CO2_PARAMETER_1: CO2_PARAMETER_1,
CO2_PARAMETER_2: CO2_PARAMETER_2,
VERSION: VERSION,
ERROR: ERROR,
RETAINED: RETAINED
};