Skip to content

Commit

Permalink
Merge pull request #12 from cparata/master
Browse files Browse the repository at this point in the history
Fix issue with INT2 events
  • Loading branch information
cparata authored Apr 15, 2021
2 parents 7f04c64 + d135086 commit 261c03d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32duino LSM6DSOX
version=2.0.0
version=2.0.1
author=SRA
maintainer=stm32duino
sentence=Ultra Low Power inertial measurement unit.
Expand Down
10 changes: 7 additions & 3 deletions src/lsm6dsox_reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -9699,9 +9699,11 @@ int32_t lsm6dsox_pin_int1_route_set(lsm6dsox_ctx_t *ctx,
md1_cfg.int1_single_tap = val.single_tap;
md1_cfg.int1_sleep_change = val.sleep_change;

emb_func_int1.not_used_01 = 0;
emb_func_int1.int1_step_detector = val.step_detector;
emb_func_int1.int1_tilt = val.tilt;
emb_func_int1.int1_sig_mot = val.sig_mot;
emb_func_int1.not_used_02 = 0;
emb_func_int1.int1_fsm_lc = val.fsm_lc;

fsm_int1_a.int1_fsm1 = val.fsm1;
Expand Down Expand Up @@ -10029,6 +10031,7 @@ int32_t lsm6dsox_pin_int2_route_set(lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx
int2_ctrl.int2_fifo_ovr = val.fifo_ovr;
int2_ctrl.int2_fifo_full = val.fifo_full;
int2_ctrl.int2_cnt_bdr = val.fifo_bdr;
int2_ctrl.not_used_01 = 0;

md2_cfg.int2_timestamp = val.timestamp;
md2_cfg.int2_6d = val.six_d;
Expand All @@ -10038,8 +10041,11 @@ int32_t lsm6dsox_pin_int2_route_set(lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx
md2_cfg.int2_single_tap = val.single_tap;
md2_cfg.int2_sleep_change = val.sleep_change;

emb_func_int2.not_used_01 = 0;
emb_func_int2. int2_step_detector = val.step_detector;
emb_func_int2.int2_tilt = val.tilt;
emb_func_int2.int2_sig_mot = val.sig_mot;
emb_func_int2.not_used_02 = 0;
emb_func_int2.int2_fsm_lc = val.fsm_lc;

fsm_int2_a.int2_fsm1 = val.fsm1;
Expand Down Expand Up @@ -10075,9 +10081,7 @@ int32_t lsm6dsox_pin_int2_route_set(lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx
if ( ( val.drdy_temp | val.timestamp ) != PROPERTY_DISABLE ) {
ctrl4_c.int2_on_int1 = PROPERTY_DISABLE;
}
else{
ctrl4_c.int2_on_int1 = PROPERTY_ENABLE;
}

ret = lsm6dsox_write_reg(ctx, LSM6DSOX_CTRL4_C, (uint8_t*)&ctrl4_c, 1);
}
}
Expand Down

0 comments on commit 261c03d

Please sign in to comment.