Negative values won't be shown
I used your library successfully in my project to watch the power consumption on a small robot. By using a Bi-Directional current meter my intension was to watch the charge current of my 18650 cells. Every-time on charging the consumed current shown was always positive and 6W (on 4V) which is not possible.
I'll recognized the bit-inverting was not working for me by using ~, instead i replaced it with "shuntVoltage = shuntVoltage ^ 0xFFFF; // invert bits". After changing this line the right charging voltage was shown.
Old: shuntVoltage = ~shuntVoltage; // invert bits New: shuntVoltage = shuntVoltage ^ 0xFFFF; // invert bits
Environment used: Raspberry Pi Zero W with Raspbian Stretch, just installed and updated.
Thank you for creating this libary.