adafruit / Adafruit_CircuitPython_SI1145

CircuitPython helper library for the SI1145 Digital UV Index IR Visible Light Sensor
MIT License
0 stars 5 forks source link

Error code getting masked out #13

Closed caternuson closed 2 years ago

caternuson commented 2 years ago

This is a minor big. The mask here should be removed: https://github.com/adafruit/Adafruit_CircuitPython_SI1145/blob/4b44479fe55e5d479b77ece46478ae04c1afe2a7/adafruit_si1145.py#L165

Masking the upper 4 bits is useful to detect if there is an error. But the actual error is then coded into the lower 4 bits. So the print should just not mask anything and print the whole response value. image

sokratisvas commented 2 years ago

I would like to help.