Zanduino / INA

Combined Arduino library for reading multiple INA2xx power monitor devices
GNU General Public License v3.0
158 stars 41 forks source link

Duplicate conversion triggering #55

Closed nathancheek closed 4 years ago

nathancheek commented 4 years ago

getShuntMicroVolts() calls getShuntRaw() which checks the device mode and triggers a conversion if appropriate.

However, after this call, getShuntMicroVolts() proceeds to also check device mode and trigger a conversion if appropriate. This results in 2 conversions being requested instead of 1.

getBusMilliVolts() seems to do this properly. It calls getBusRaw() which triggers the conversion, and does NOT try to trigger a conversion itself.

SV-Zanshin commented 4 years ago

Removed extra code.