File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ def _wait_measurement(self, timeout_ms=100):
185185 # --------------------------------------------------
186186
187187 def _read_raw (self ):
188- """Read raw ADC values for pressure, temperature, humidity (burst read ).
188+ """Read raw ADC values via burst read (0xF7-0xFE, 8 bytes ).
189189
190190 Returns (raw_temp, raw_press, raw_hum) as 20-bit/20-bit/16-bit integers.
191191 """
@@ -227,8 +227,6 @@ def _compensate_pressure(self, raw_press):
227227 def _compensate_humidity (self , raw_hum ):
228228 """Compute compensated humidity in Q22.10 fixed point."""
229229 h = self .t_fine - 76800
230- if h == 0 :
231- return 0
232230 h = (
233231 (((raw_hum << 14 ) - (self .dig_H4 << 20 ) - (self .dig_H5 * h )) + 16384 )
234232 >> 15
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ tests:
186186 expect_true : true
187187 mode : [mock]
188188
189- - name : " temperature_ready delegates to data_ready"
189+ - name : " All ready methods delegate to data_ready"
190190 action : script
191191 script : |
192192 result = dev.temperature_ready() and dev.pressure_ready() and dev.humidity_ready()
You can’t perform that action at this time.
0 commit comments