aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorMRX8024 <57844100+MRX8024@users.noreply.github.com>2025-03-24 12:36:17 +0200
committerKevinOConnor <kevin@koconnor.net>2025-04-03 14:08:23 -0400
commit869440a7edb6d999c292e27550e79458116c9781 (patch)
tree32422fb5e6d18e97268650aed360967c583f837e /klippy/extras
parent20f26b534db9ff2885f1dba68b326918c430c756 (diff)
downloadkutter-869440a7edb6d999c292e27550e79458116c9781.tar.gz
kutter-869440a7edb6d999c292e27550e79458116c9781.tar.xz
kutter-869440a7edb6d999c292e27550e79458116c9781.zip
icm20948: Transition from 8g to 16g accels scale
During standard resonance measurements, the icm20948 in 8g mode may reach the accels max threshold. Signed-off-by: Maksim Bolgov maksim8024@gmail.com
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/icm20948.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/extras/icm20948.py b/klippy/extras/icm20948.py
index 2503a473..29eece7b 100644
--- a/klippy/extras/icm20948.py
+++ b/klippy/extras/icm20948.py
@@ -39,7 +39,7 @@ SET_BANK_0 = 0x00
SET_BANK_1 = 0x10
SET_BANK_2 = 0x20
SET_BANK_3 = 0x30
-SET_ACCEL_CONFIG = 0x04 # 8g full scale, 1209Hz BW, ??? delay 4.5kHz samp rate
+SET_ACCEL_CONFIG = 0x06 # 16g full scale, 1209Hz BW, ??? delay 4.5kHz samp rate
SET_PWR_MGMT_1_WAKE = 0x01
SET_PWR_MGMT_1_SLEEP= 0x41
SET_PWR_MGMT_2_ACCEL_ON = 0x07
@@ -50,8 +50,8 @@ SET_ENABLE_FIFO = 0x10
SET_DISABLE_FIFO = 0x00
FREEFALL_ACCEL = 9.80665 * 1000.
-# SCALE = 1/4096 g/LSB @8g scale * Earth gravity in mm/s**2
-SCALE = 0.000244140625 * FREEFALL_ACCEL
+# SCALE = 1/2048 g/LSB @16g scale * Earth gravity in mm/s**2
+SCALE = 0.00048828125 * FREEFALL_ACCEL
FIFO_SIZE = 512