File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 21
21
# imports
22
22
23
23
try :
24
+ import typing # pylint: disable=unused-import
24
25
from board import I2C
25
26
except ImportError :
26
27
pass
@@ -169,11 +170,11 @@ class INA260:
169
170
"""Driver for the INA260 power and current sensor.
170
171
171
172
:param ~busio.I2C i2c_bus: The I2C bus the INA260 is connected to.
172
- :param address: The I2C device address for the sensor. Default is ``0x40``.
173
+ :param address int : The I2C device address for the sensor. Default is ``0x40``.
173
174
174
175
"""
175
176
176
- def __init__ (self , i2c_bus : I2C () , address : int = 0x40 ) -> None :
177
+ def __init__ (self , i2c_bus : board . I2C , address : int = 0x40 ) -> None :
177
178
self .i2c_device = i2cdevice .I2CDevice (i2c_bus , address )
178
179
179
180
if self ._manufacturer_id != self .TEXAS_INSTRUMENT_ID :
@@ -300,7 +301,7 @@ def voltage(self) -> float:
300
301
return self ._raw_voltage * 0.00125
301
302
302
303
@property
303
- def power (self ) -> float :
304
+ def power (self ) -> int :
304
305
"""The power being delivered to the load in mW"""
305
306
if self .mode == Mode .TRIGGERED :
306
307
while self ._conversion_ready_flag == 0 :
You can’t perform that action at this time.
0 commit comments