adafruit/Adafruit_CircuitPython_SI1145

Error code getting masked out

Closed this issue · 1 comments

This is a minor big. The mask here should be removed:

raise RuntimeError("SI1145 Error: 0x{:02x}".format(response & 0xF0))

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

I would like to help.