We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 466f4f9 commit abc5e1fCopy full SHA for abc5e1f
1 file changed
lib/hts221/hts221/device.py
@@ -110,6 +110,11 @@ def trigger_one_shot(self):
110
def _ensure_data(self):
111
if self._is_power_down() or self._is_one_shot_mode():
112
self.trigger_one_shot()
113
+ for _ in range(50):
114
+ if self._read_reg(HTS221_STATUS_REG) & HTS221_STATUS_T_DA:
115
+ return
116
+ sleep_ms(2)
117
+ raise OSError("HTS221 data ready timeout")
118
119
# calculate Temperature
120
def temperature(self):
0 commit comments