This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 348cb61  sensors/adxl345: Fix adxl345_get_tap_settings bit filed 
handling
348cb61 is described below

commit 348cb613a1229482b6fdc1f12d0ab42df43ba56f
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Fri Sep 27 10:17:02 2019 +0200

    sensors/adxl345: Fix adxl345_get_tap_settings bit filed handling
    
    Obvious copy/paster error where x_enable field was used
    in places where y_enable and z_enable should have been.
---
 hw/drivers/sensors/adxl345/src/adxl345.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/drivers/sensors/adxl345/src/adxl345.c 
b/hw/drivers/sensors/adxl345/src/adxl345.c
index f6db099..f4e90f8 100644
--- a/hw/drivers/sensors/adxl345/src/adxl345.c
+++ b/hw/drivers/sensors/adxl345/src/adxl345.c
@@ -843,8 +843,8 @@ adxl345_get_tap_settings(struct sensor_itf *itf, struct 
adxl345_tap_settings *se
     }
 
     settings->x_enable = (enables & (1 << 2)) != 0;
-    settings->x_enable = (enables & (1 << 1)) != 0;
-    settings->x_enable = (enables & (1 << 0)) != 0;
+    settings->y_enable = (enables & (1 << 1)) != 0;
+    settings->z_enable = (enables & (1 << 0)) != 0;
     settings->suppress = (enables & (1 << 3)) != 0;
 
     return 0;

Reply via email to