chrisb2 / pyb_ina219

This library for MicroPython makes it easy to leverage the complex functionality of the Texas Instruments INA219 sensor to measure voltage, current and power.
MIT License
56 stars 19 forks source link

Fix call to logging._level #12

Open TomHodson opened 1 year ago

TomHodson commented 1 year ago

I just installed your excellent library on an ESP32, and got it working by making this change. I can't say I've read every line of your library and logging.py but it looks like maybe logging._level was removed at some point after you wrote the library?

Anyway I think using self._log.level seems to be the right fix.

TomHodson commented 1 year ago

An additional fix, to get the logging levels to work (I wanted to disable logging by setting logLevel to WARNING) I had to as make the change in the second commit

TomHodson commented 1 year ago

Any updates on this? I'm pretty sure it works and you could just merge it.