adafruit / adafruit/Adafruit_CircuitPython_LSM6DS
Misleading error message on WHO_AM_I ID check
- Dominant language
- Python
- Stars
- 34
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open adafruit_lsm6ds/__init__.py at the linked WHO_AM_I check around line 230 and read how the selected and detected chip identifiers are used. Update the error wording so it identifies the selected and found chip classes rather than attributing the mismatch to wiring, then verify the resulting message for an LSM6DS3TR versus LSM6DS33 mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100