adafruit / Adafruit_CircuitPython_seesaw

seesaw helper IC driver for circuitPython
MIT License
60 stars 35 forks source link

seesaw.py - incorrect reading below 0C #131

Open sciencedude1990 opened 7 months ago

sciencedude1990 commented 7 months ago

Hi there,

I think the routine get_temp() in seesaw.py does not operate correctly below 0C.

Not sure you need the & 0x3F - I think you want to take the ret, check if it is above (1 << 31), and if so, subtract off 1<<32, then perhaps apply the scaling factor...

I think the Adafruit_seesaw.cpp might have the same issue.

Thanks!