Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message on WHO_AM_I ID check #63

Open
strg-v opened this issue Dec 21, 2023 · 1 comment
Open

Misleading error message on WHO_AM_I ID check #63

strg-v opened this issue Dec 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@strg-v
Copy link

strg-v commented Dec 21, 2023

In the following line, you check for the chip version ID (register is called "WHO_AM_I" in the datasheet):

https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS/blob/c4d6b88c5d537e0ba6b430987ccb2020475dc2e5/adafruit_lsm6ds/__init__.py#L230C22-L230C22

I designed a PCB with the LSM6DS3TR, but the manufacturer of the PCB has a messed up data bank assembled my PCB with the LSM6DS33.

The error message states that I have a wiring issue. A more appropriate message would be "wrong selected chip class, selected X found y". Or something like that.

That took quite some time to figure the actual error out.

@tekktrik
Copy link
Member

What do you think about:

f"Failed to find {self.__class__.__name__} - check your wiring/chip (found {self._chip_id})!"

@tekktrik tekktrik added the enhancement New feature or request label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants