aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/adxl345.py
diff options
context:
space:
mode:
authorDmitry Butyugin <dmbutyugin@google.com>2021-09-26 01:57:10 +0200
committerKevin O'Connor <kevin@koconnor.net>2021-10-06 21:17:56 -0400
commit2822680eb453656673931eff5c5f3a8bd37df63a (patch)
tree60ff1ecf20747b57f3f5cd0584f6625313f34c31 /klippy/extras/adxl345.py
parentbd5dc033172f40a03adac530f20e166f700c0401 (diff)
downloadkutter-2822680eb453656673931eff5c5f3a8bd37df63a.tar.gz
kutter-2822680eb453656673931eff5c5f3a8bd37df63a.tar.xz
kutter-2822680eb453656673931eff5c5f3a8bd37df63a.zip
adxl345: Expanded invalid adxl345 id message
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Diffstat (limited to 'klippy/extras/adxl345.py')
-rw-r--r--klippy/extras/adxl345.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/klippy/extras/adxl345.py b/klippy/extras/adxl345.py
index a4132573..e331e33d 100644
--- a/klippy/extras/adxl345.py
+++ b/klippy/extras/adxl345.py
@@ -346,8 +346,11 @@ class ADXL345:
# noise or wrong signal as a correctly initialized device
dev_id = self.read_reg(REG_DEVID)
if dev_id != ADXL345_DEV_ID:
- raise self.printer.command_error("Invalid adxl345 id (got %x vs %x)"
- % (dev_id, ADXL345_DEV_ID))
+ raise self.printer.command_error(
+ "Invalid adxl345 id (got %x vs %x).\n"
+ "This is generally indicative of connection problems\n"
+ "(e.g. faulty wiring) or a faulty adxl345 chip."
+ % (dev_id, ADXL345_DEV_ID))
# Setup chip in requested query rate
self.set_reg(REG_POWER_CTL, 0x00)
self.set_reg(REG_DATA_FORMAT, 0x0B)