From aaf916fc1dcc469ac21519fa829fd17c83177fd7 Mon Sep 17 00:00:00 2001 From: Romolo Manfredini Date: Sun, 27 Feb 2022 21:44:41 +0100 Subject: [PATCH] Support for newer MPU Several MPU available on ecommerce stores, report 4 as revision. I don't know if it's because they are newer or simply because they are fake. --- openXsensor/inv_mpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openXsensor/inv_mpu.c b/openXsensor/inv_mpu.c index 8164654..965d796 100644 --- a/openXsensor/inv_mpu.c +++ b/openXsensor/inv_mpu.c @@ -401,7 +401,7 @@ int mpu_init() if (rev) { /* Congrats, these parts are better. */ if (rev == 1) chip_cfg.accel_half = 1; - else if (rev == 2) chip_cfg.accel_half = 0; + else if ((rev == 2) || (rev ==4)) chip_cfg.accel_half = 0; else { log_e("Unsupported software product rev %d.\n", rev); return -1; @@ -2194,4 +2194,3 @@ lp_int_restore: /** * @} */ - -- 2.11.4.GIT