@@ -77,25 +77,29 @@ def __init__(self, i2c, address=_SGP30_DEFAULT_I2C_ADDR):
77
77
78
78
79
79
@property
80
- def tvoc (self ):
80
+ # pylint: disable=invalid-name
81
+ def TVOC (self ):
81
82
"""Total Volatile Organic Compound in parts per billion."""
82
83
return self .iaq_measure ()[1 ]
83
84
84
85
85
86
@property
86
- def baseline_tvoc (self ):
87
+ # pylint: disable=invalid-name
88
+ def baseline_TVOC (self ):
87
89
"""Total Volatile Organic Compound baseline value"""
88
90
return self .get_iaq_baseline ()[1 ]
89
91
90
92
91
93
@property
92
- def co2eq (self ):
94
+ # pylint: disable=invalid-name
95
+ def eCO2 (self ):
93
96
"""Carbon Dioxide Equivalent in parts per million"""
94
97
return self .iaq_measure ()[0 ]
95
98
96
99
97
100
@property
98
- def baseline_co2eq (self ):
101
+ # pylint: disable=invalid-name
102
+ def baseline_eCO2 (self ):
99
103
"""Carbon Dioxide Equivalent baseline value"""
100
104
return self .get_iaq_baseline ()[0 ]
101
105
@@ -106,22 +110,21 @@ def iaq_init(self):
106
110
self ._run_profile (["iaq_init" , [0x20 , 0x03 ], 0 , 0.01 ])
107
111
108
112
def iaq_measure (self ):
109
- """Measure the CO2eq and TVOC"""
113
+ """Measure the eCO2 and TVOC"""
110
114
# name, command, signals, delay
111
115
return self ._run_profile (["iaq_measure" , [0x20 , 0x08 ], 2 , 0.05 ])
112
116
113
117
def get_iaq_baseline (self ):
114
- """Retreive the IAQ algorithm baseline for CO2eq and TVOC"""
118
+ """Retreive the IAQ algorithm baseline for eCO2 and TVOC"""
115
119
# name, command, signals, delay
116
120
return self ._run_profile (["iaq_get_baseline" , [0x20 , 0x15 ], 2 , 0.01 ])
117
121
118
-
119
- def set_iaq_baseline (self , co2eq , tvoc ):
120
- """Set the previously recorded IAQ algorithm baseline for CO2eq and TVOC"""
121
- if co2eq == 0 and tvoc == 0 :
122
+ def set_iaq_baseline (self , eCO2 , TVOC ): # pylint: disable=invalid-name
123
+ """Set the previously recorded IAQ algorithm baseline for eCO2 and TVOC"""
124
+ if eCO2 == 0 and TVOC == 0 :
122
125
raise RuntimeError ('Invalid baseline' )
123
126
buffer = []
124
- for value in [tvoc , co2eq ]:
127
+ for value in [TVOC , eCO2 ]:
125
128
arr = [value >> 8 , value & 0xFF ]
126
129
arr .append (self ._generate_crc (arr ))
127
130
buffer += arr
0 commit comments