aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/lis2dw.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-04-29 12:07:28 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-04-29 12:07:28 -0400
commitd8d072b3759a2b62de37efd4b8811d962a4d7e7c (patch)
tree039deea7aedf47f03bd01f661d306b41b6010bfa /klippy/extras/lis2dw.py
parent7b490f3ec1d3f0477b90c74d96f51ba1fb457a46 (diff)
downloadkutter-d8d072b3759a2b62de37efd4b8811d962a4d7e7c.tar.gz
kutter-d8d072b3759a2b62de37efd4b8811d962a4d7e7c.tar.xz
kutter-d8d072b3759a2b62de37efd4b8811d962a4d7e7c.zip
adxl345: Fix read_axes_map() for non-adxl345 accelerometers
Commit 3f845019 unified the reading of the axes_map configuration variable, but broke the per-sensor scaling capabilities. Pass the scale parameters to read_axes_map() so that it can be implemented per-sensor. Reported by @Neko-vecter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/lis2dw.py')
-rw-r--r--klippy/extras/lis2dw.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/extras/lis2dw.py b/klippy/extras/lis2dw.py
index 3f17c1f4..45c12ea1 100644
--- a/klippy/extras/lis2dw.py
+++ b/klippy/extras/lis2dw.py
@@ -37,7 +37,7 @@ class LIS2DW:
def __init__(self, config):
self.printer = config.get_printer()
adxl345.AccelCommandHelper(config, self)
- self.axes_map = adxl345.read_axes_map(config)
+ self.axes_map = adxl345.read_axes_map(config, SCALE, SCALE, SCALE)
self.data_rate = 1600
# Setup mcu sensor_lis2dw bulk query code
self.spi = bus.MCU_SPI_from_config(config, 3, default_speed=5000000)