Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions adafruit_ina3221.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,17 @@ def summation_channel(self, value: bool) -> None:
class INA3221:
"""Driver for the INA3221 device with three channels."""

def __init__(self, i2c, address: int = DEFAULT_ADDRESS, enable: List = [0, 1, 2]) -> None:
def __init__(
self, i2c, address: int = DEFAULT_ADDRESS, enable: List = [0, 1, 2], probe: bool = True
) -> None:
"""Initializes the INA3221 class over I2C
Args:
i2c (I2C): The I2C bus to which the INA3221 is connected.
address (int, optional): The I2C address of the INA3221. Defaults to DEFAULT_ADDRESS.
enable(List[int], optional): channels to initialize at start (default: all)
probe (bool, optiona): Probe for the device upon object creation, default is true
"""
self.i2c_dev = I2CDevice(i2c, address)
self.i2c_dev = I2CDevice(i2c, address, probe=probe)
self.reset()

self.channels: List[INA3221Channel] = [INA3221Channel(self, i) for i in range(3)]
Expand Down