This repository was archived by the owner on Dec 18, 2024. It is now read-only.
File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 18
18
from micropython import const
19
19
from micropython_mpl3115a2 .i2c_helpers import CBits , RegisterStruct
20
20
21
- try :
22
- from typing import Tuple
23
- except ImportError :
24
- pass
25
-
26
21
27
22
__version__ = "0.0.0+auto.0"
28
23
__repo__ = "https://github.com/jposada202020/MicroPython_MPL3115A2.git"
@@ -141,7 +136,7 @@ def oversample_ratio(self, value: int) -> None:
141
136
self ._oversample_ratio = value
142
137
143
138
@property
144
- def pressure (self ):
139
+ def pressure (self ) -> float :
145
140
"""
146
141
Read the barometric pressure detected by the sensor in Hectopascals.
147
142
"""
@@ -161,15 +156,15 @@ def pressure(self):
161
156
162
157
return pressure / 400.0
163
158
164
- def _poll_reg1 (self ):
159
+ def _poll_reg1 (self ) -> None :
165
160
"""
166
161
Poll the ost_status to NOT be present.
167
162
"""
168
163
while self ._ost_status > 0 :
169
164
time .sleep (0.01 )
170
165
171
166
@property
172
- def altitude (self ):
167
+ def altitude (self ) -> float :
173
168
"""Read the altitude as calculated based on the sensor pressure and
174
169
previously configured pressure at sea-level. This will return a
175
170
value in meters. Set the sea-level pressure by updating the
@@ -189,7 +184,7 @@ def altitude(self):
189
184
return altitude / 65535.0
190
185
191
186
@property
192
- def temperature (self ):
187
+ def temperature (self ) -> float :
193
188
"""
194
189
Read the temperature as measured by the sensor in Celsius.
195
190
"""
You can’t perform that action at this time.
0 commit comments