Adafruit INA260 library

Hi all,
for info:
although the library version shown in the platformio library manager is the same for the INA260 library as in the adafruit github repository, the libraries differ. The platformio version shows compile errors, as severl casts from uint32_t to required enums are missing, e.g.:
“return (INA260_ConversionTime)voltage_conversion_time.read();”, where the (INA260_ConversionTime) is missing in the platformio version.

i do not know if thats up to adafruit to fix/submit or not, just wanted to point out the problem.
By the way, just add the missing casts to the enums as in the adafruit library and it compiles.

Rgds Vinc

Indeed, Adafruit just pulled in a PR which fixes this bug but did not increase the version number, which causes PIO to not pick up the changes. 1.3.0 from PIO’s eyes is commit 7f5760fcff3d386e0f292a289d8889f17c194903, aka 3 commits behind master.

To fix it temporarily, instruct PIO to download the latest Git version.

lib_deps = https://github.com/adafruit/Adafruit_INA260.git

And also file an issue at Issues · adafruit/Adafruit_INA260 · GitHub to increase the version number to like 1.3.1.

1 Like

Thanks, will do!

Rgds Vinc