From 829cc981e4a28916e4741e2c3cc485c3cb0d8709 Mon Sep 17 00:00:00 2001 From: Anthony Loiseau Date: Wed, 18 Apr 2018 21:40:11 +0200 Subject: [PATCH] Fix any-motion duration setting This simple commit fixes a bad mask applied when setting any-motion interrupt duration. --- bmi160.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmi160.c b/bmi160.c index c5df92d..9b36e8a 100644 --- a/bmi160.c +++ b/bmi160.c @@ -3571,7 +3571,7 @@ static int8_t config_any_dur_threshold(const struct bmi160_acc_any_mot_int_cfg * /* slope duration */ dur = (uint8_t)any_motion_int_cfg->anymotion_dur; temp = data & ~BMI160_SLOPE_INT_DUR_MASK; - data = temp | (dur & BMI160_MOTION_SRC_INT_MASK); + data = temp | (dur & BMI160_SLOPE_INT_DUR_MASK); data_array[0] = data; /* add slope threshold */ data_array[1] = any_motion_int_cfg->anymotion_thr;