Description
I am using 18 INA219 boards in parallel using 3 PCA9548 multiplexers and the threading
Python package, and I am running triggered measurements.
So I create a few instances of the INA219 class and then I send triggers to them, check when the measurements are ready and fetch the measurement data.
The problem I observed is that conversion_ready
is a class variable, as defined here outside of the __init__
function:
So the value will not be instance-specific and all the INA219 objects will share the same values for conversion_ready
. Clearly, this is a problem for me.
In the same way, I suspect I can have the same issue also with the other data I acquire from the INA219 boards, no?
For example, also the bus_voltage
property relies on the raw_bus_voltage
class variable and the current
property relies on the raw_current
class variable. Should I expect the same issue also for these?
Adafruit_CircuitPython_INA219/adafruit_ina219.py
Lines 176 to 182 in 66dc89e