Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 15497c2

Browse files
committed
first commit
1 parent a3af469 commit 15497c2

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

micropython_mpl3115a2/mpl3115a2.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
from micropython import const
1919
from micropython_mpl3115a2.i2c_helpers import CBits, RegisterStruct
2020

21-
try:
22-
from typing import Tuple
23-
except ImportError:
24-
pass
25-
2621

2722
__version__ = "0.0.0+auto.0"
2823
__repo__ = "https://github.com/jposada202020/MicroPython_MPL3115A2.git"
@@ -141,7 +136,7 @@ def oversample_ratio(self, value: int) -> None:
141136
self._oversample_ratio = value
142137

143138
@property
144-
def pressure(self):
139+
def pressure(self) -> float:
145140
"""
146141
Read the barometric pressure detected by the sensor in Hectopascals.
147142
"""
@@ -161,15 +156,15 @@ def pressure(self):
161156

162157
return pressure / 400.0
163158

164-
def _poll_reg1(self):
159+
def _poll_reg1(self) -> None:
165160
"""
166161
Poll the ost_status to NOT be present.
167162
"""
168163
while self._ost_status > 0:
169164
time.sleep(0.01)
170165

171166
@property
172-
def altitude(self):
167+
def altitude(self) -> float:
173168
"""Read the altitude as calculated based on the sensor pressure and
174169
previously configured pressure at sea-level. This will return a
175170
value in meters. Set the sea-level pressure by updating the
@@ -189,7 +184,7 @@ def altitude(self):
189184
return altitude / 65535.0
190185

191186
@property
192-
def temperature(self):
187+
def temperature(self) -> float:
193188
"""
194189
Read the temperature as measured by the sensor in Celsius.
195190
"""

0 commit comments

Comments
 (0)