From 869440a7edb6d999c292e27550e79458116c9781 Mon Sep 17 00:00:00 2001 From: MRX8024 <57844100+MRX8024@users.noreply.github.com> Date: Mon, 24 Mar 2025 12:36:17 +0200 Subject: [PATCH] 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 --- klippy/extras/icm20948.py | 6 +++--- 1 file 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