Skip to content
Merged
Prev Previous commit
Next Next commit
Update adafruit_ina260.py
add empty rows to resolve merge conflicts
  • Loading branch information
gpongelli committed Feb 16, 2021
commit c3b5aff336076d02b02d2c04c1110b1c38deed18
8 changes: 8 additions & 0 deletions adafruit_ina260.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
# pylint: disable=too-few-public-methods
class Mode:
"""Modes avaible to be set

+--------------------+---------------------------------------------------------------------+
| Mode | Description |
+====================+=====================================================================+
Expand All @@ -57,6 +58,7 @@ class Mode:
| ``Mode.SHUTDOWN`` | Shutdown the sensor, reducing the quiescent current and turning off|
| | current into the device inputs. Set another mode to re-enable |
+--------------------+---------------------------------------------------------------------+

"""

SHUTDOWN = const(0x0)
Expand All @@ -66,6 +68,7 @@ class Mode:

class ConversionTime:
"""Options for ``current_conversion_time`` or ``voltage_conversion_time``

+----------------------------------+------------------+
| ``ConversionTime`` | Time |
+==================================+==================+
Expand All @@ -85,6 +88,7 @@ class ConversionTime:
+----------------------------------+------------------+
| ``ConversionTime.TIME_8_244_ms`` | 8.244 ms |
+----------------------------------+------------------+

"""

TIME_140_us = const(0x0)
Expand Down Expand Up @@ -114,6 +118,7 @@ def get_seconds(time_enum):

class AveragingCount:
"""Options for ``averaging_count``

+-------------------------------+------------------------------------+
| ``AveragingCount`` | Number of measurements to average |
+===============================+====================================+
Expand All @@ -133,6 +138,7 @@ class AveragingCount:
+-------------------------------+------------------------------------+
| ``AveragingCount.COUNT_1024`` | 1024 |
+-------------------------------+------------------------------------+

"""

COUNT_1 = const(0x0)
Expand All @@ -156,8 +162,10 @@ def get_averaging_count(avg_count):

class INA260:
"""Driver for the INA260 power and current sensor.

:param ~busio.I2C i2c_bus: The I2C bus the INA260 is connected to.
:param address: The I2C device address for the sensor. Default is ``0x40``.

"""

def __init__(self, i2c_bus, address=0x40):
Expand Down